Don't rename image files

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
bdurfee
Posts: 21
Joined: 2013-02-07 17:44

Don't rename image files

Post by bdurfee » 2018-12-18 16:47

I have an image upload field, but I don't want AG to rename images when it uploads them. How do I do this?

peebee
AppGini Super Hero
AppGini Super Hero
Posts: 209
Joined: 2013-03-21 04:37

Re: Don't rename image files

Post by peebee » 2018-12-19 00:40

When selecting image/file upload option for a field you will be presented with the popup dialogue box below. Check the "Don't rename uploaded files" checkbox. Done.
screenshot3.jpg
screenshot3.jpg (133.44 KiB) Viewed 634 times

bdurfee
Posts: 21
Joined: 2013-02-07 17:44

Re: Don't rename image files

Post by bdurfee » 2018-12-19 03:23

Thanks! I was using the image field instead of file upload.

peebee
AppGini Super Hero
AppGini Super Hero
Posts: 209
Joined: 2013-03-21 04:37

Re: Don't rename image files

Post by peebee » 2018-12-19 04:51

I didn't actually try out what I posted as I always rename uploads (to save duplicate file name issues and also for security reasons).

I am imagining that if you use the file upload checkbox, you will likely not end up with thumbnail images but more likely a downloadable link?

I haven't got time to test it for myself but I'm interested to see what happens?

User avatar
ronwill
Veteran Member
Posts: 101
Joined: 2015-08-08 10:12
Location: Cheltenham UK +Weatherford USA

Re: Don't rename image files

Post by ronwill » 2018-12-19 21:23

When I want the same, I create an image field, and in one step I select the file upload setting as shown above and choose dont rename, then I select Image, do my settings (thumbs size etc) and move on to next task....
I've found that by doing this that the uploaded image files (for this image field) retain the uploaded image file name without issues. If I don't follow this and just go straight to image settings the default setting for file uploads is applied and image name is changed.
Ron - AppGini Pro V 5.76 Rev 1058
Gloucestershire, UK

Post Reply