1up-lab / OneupUploaderBundle

This Symfony bundle provides a server implementation for handling single and multiple file uploads using either FineUploader, jQuery File Uploader, YUI3 Uploader, Uploadify, FancyUpload, MooUpload, Plupload or Dropzone. Features include chunked uploads, orphanages, Gaufrette and Flysystem support.
MIT License
604 stars 177 forks source link

Getting the old filename in pastUpload after namer #415

Closed Hanmac closed 2 years ago

Hanmac commented 2 years ago

Question

Q A
Version 3.1.3

I don't know if its more a Feature Request than a Bug or just a general Question:

My Customers are only allowed to upload special file names from a list. (Database Entries) so i have a Subscriber for validation and pastUpload in validation i check if the uploaded file name is in the list of allowed names.

in pastUpload i mark the file in the list as uploaded. (setting filesystem path and other properties)

in the Validation Event i still have the old name of the uploading file, but this information is missing in the pastUpload when the file only has the name given by the namer. (the file on the file system should still be a cryptic one)

What would be the best way to handle such a problem? my current one is to add attributes to the Request object?

bytehead commented 2 years ago

Did you check the original request for occurences on the original filename? Adding attributes is one possibility. You could also think of a seperate service (which you inject) tracking the filename changes during the request?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.