cakephp-filesystem icon indicating copy to clipboard operation
cakephp-filesystem copied to clipboard

Stop upload event by checking uploaded file hash

Open rudy1976s opened this issue 4 years ago • 1 comments

I would need to be able to determine wheter a file should be "archived" or not. I have noticed in your code that you are not giving the possibility of stopping the upload event. My goal is to prevent storage of duplicate files: I cannot obviously rely on filename, but rather checking file hash would be enough to determine if the file has been already uploaded before, and thus return only an instance of that file ( could be the entity stored in DB for example ).

Are you interested in such feature ?

Rudy

rudy1976s avatar Mar 05 '20 16:03 rudy1976s

Hi, sounds like a reasonable feature and not too difficult to implement, would you like to give it a try and submit a PR?

josbeir avatar Mar 05 '20 19:03 josbeir