Skip to content

Import upload driver server 500 error then creates incorrect filenames in database #13

@cylkee

Description

@cylkee

The error log shows a line break so I suspect what was sent to filesize() was not trimmed.

Fatal Error: ErrorException 0 - filesize(): stat failed for /path-redacted/workspace/images/
filename.jpg on line 39 of /path-redacted/extensions/importcsv/drivers/ImportDriver_upload.php

I tweaked ImportDriver_upload.php to always trim($value) and the import worked but a separate issue arose where it created incorrect filenames in the database. I tweaked it again changing $fileData['file'] to take trim($value) redid the import and all was fine.

Pull request: #12

This is two issues in one, sorry.

CentOS Linux 7.6.1810
Symphony 2.7.10
PHP 7.1.30
Time to test and create issue and PR 1.5 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions