Skip to content
This repository was archived by the owner on Nov 16, 2022. It is now read-only.
This repository was archived by the owner on Nov 16, 2022. It is now read-only.

Inconsistent behavior with large image uploads #267

@spacebiscuit

Description

@spacebiscuit

When i try to upload 2 files which are each around 4mb my request data is empty when I debug in my add method of my controller. If I use smaller files I don't experience this behaviour.

Sometimes when I try a 4mb file and a smaller file around 1mb I see the related hasmany images database table is saved with the dir field as null, the foreign key of the parent is saved and no files are uploaded.

To try and address this I added some validation rules, to limit the dimensions of any files uploaded. The following validation method fails:

src\Model\Validation\UserProfferRules.php :: dimensions

line 28:

$fileDimensions = getimagesize($value['tmp_name']);

Since my field is multi-file upload - 'listing_images[]' the data is in an array and so it should be:

$fileDimensions = getimagesize($value[0]['tmp_name']);

I guess I could write my own custom validator to handle this.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions