Skip to content

Load CSV #196

@leocharrua

Description

@leocharrua

I have a Yii2 App, with this code:

<?= $form->field($model, 'archivo_entrada_file')->widget(FileInput::class, [            
            'pluginOptions'=>[
                'fileActionSettings' => [
                    'showDrag' => false,
                ],
                'initialPreviewShowDelete' => false,
                'overwriteInitial' => true,
                'allowedFileExtensions'=>['xlsx','xls','csv'],
                'dropZoneEnabled' => true,
                'showUpload' => false,
                'removeClass' => 'btn btn-danger',
                'showCancel' => false,
                'showMove' => false,
                'showCaption' => false,
                'browseLabel' =>  Yii::t('app','Seleccionar Archivo'),
            ]
    ]); ?>

The widget works ok with "xls" and "xlsx" files, but when I try to load a "csv" file, after de file is loaded, the windows "save as" dialog appears. I don't have any in the code for that happening.

Can you help me?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions