Skip to content

Conversation

@hasanilingi
Copy link
Contributor

When you set Dropzone.options.uploadForm.uploadMultiple : true in config of an instance of dropzone 5.7.2 the request is created by dropzone creates multidimensional input of the upload like below;
upload[][0]: (binary)
upload[][1]: (binary)
upload[][2]: (binary)

When you send this request it is trying to validate this array values which is already array in UniSharp\LaravelFilemanager::uploadValidator() but it is not a instance of UploadedFile it is instance of array. So with flatting this array we convert request array to a single dimension array like below;
upload[0]: (binary)
upload[1]: (binary)
upload[2]: (binary)

(optional) Issue number:

Summary of the change:

When you set Dropzone.options.uploadForm.uploadMultiple : true in config of an instance of dropzone 5.7.2 the request is created by dropzone creates multidimensional input of the upload like below;
upload[][0]: (binary)
upload[][1]: (binary)
upload[][2]: (binary)

When you send this request it is trying to validate this array values which is already array in UniSharp\LaravelFilemanager::uploadValidator() but it is not a instance of UploadedFile it is instance of array. So with flatting this array we convert request array to a single dimension array like below;
upload[0]: (binary)
upload[1]: (binary)
upload[2]: (binary)
@streamtw streamtw merged commit 9091f98 into UniSharp:master Aug 17, 2025
@streamtw
Copy link
Member

Thanks @hasanilingi !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants