Uploading images

User 464893 Photo


Ambassador
1,611 posts

I am not using any email settings, Only using the form to upload text to a csv file and images to storage

I seem to have a problem with uploading images
1. If I have the file limit set say to 100kb and I have an image greater there is no warning but nothing gets uploaded
2. I readjust the size of the images and all uploads ok
but
3. If I upload the same images they do not overwrite the previous version but get renamed to unrecognised file names.

Is there a quick adjustment to a script to force overwrite, and should there normally be a warning about file size prior to allowing submission.

Otherwise all is well with the world I can always kill (PHP Joke) the files after use but that is an extra step I hope I do not have to take. Page load time and all that.


The Guy from OZ


User 103173 Photo


VP of Software Development
0 posts

1. I think you would have to write a JavaScript of some kind that would read the byte size of the file and then have compare something with the server to determine what the max size can be. We looked into it a while ago and it was very complex to do it the right way.

2. That is done on purpose to prevent different people from uploading the same file name to the server. That should not be hard to modify in the scripts.
Learn the essentials with these quick tips for Responsive Site Designer, Responsive Email Designer, Foundation Framer, and the new Bootstrap Builder. You'll be making awesome, code-free responsive websites and newsletters like a boss.
User 464893 Photo


Ambassador
1,611 posts

Thanks Scott, it is slightly left of what the form is designed for but I have a solution. I shall move the files on upload and overwrite them in a folder. Guess I was hoping for the easy way but it still is a dream to use compared with setting up a manual form to do the same job. I will probably do a file size check on images prior to upload not a biggie. I will find a solution to that.

VSD for the Templates, Coffee for the clever bits and WFB to control the shooting match what a combination.
The Guy from OZ



Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.