Jump to content
Sign in to follow this  
XxWickedxX

Prevent image overwrite on product upload.

Recommended Posts

I've been on this for hours with no avail. A couple reasons preventing product images directory from being able to overwrite another file is as follows if its possible to do.

 

*Multiple Admins uploading product images end up eventually overwriting another persons images.

 

*A store with a high product volume becomes a higher risk at every upload of possibly overwriting an older product image by using the same file name when uploading.

 

It seems a like a check could be added to prevent or flag an error before overwriting an existing image when uploading product images. I have already thought of permission changes as a first thought. Its not feasible because lowering perms below 644 causes a failure to render on the catalog for obvious reasons so its not that simple.

 

Alternatively, if such a check can not be made I foresee a couple less than equal equivalents.

 

A.) The file names could be uploaded automatically by being auto titled with something such as a date format preventing replication. (would work but probably not favored)

 

B.) A more equal option would be to utilize some of the features the Contribution Download File Helper utilizes. This contrib as one feature it has is a check button that will check the download directory for a desired filename and reflect either a red or green fill color to acknowledge if a file with that name exist or not. Someone above my minor manipulation knowledge could use that feature from that mod and make place check buttons beside the browse buttons for the image directory instead. I tried to do this with no luck (Limited understanding).

 

C.) Using the PHP IF FILE EXIST Function connected with a call to the text field of an entered value upon activating the submit process. I almost knew how to pull this off but do not know how to make the file name in the FILE EXIST FUNCTION to reflect a form submitted value rather than a hard coded input.

 

I would be very interested to see this concept get picked up by someone with the know how. I feel its a needed feature since overwriting past product image files can be achieved accidentally so easily. I welcome any comments from those who would be interested in such a feature as well.

Edited by XxWickedxX

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×