image name issue

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

image name issue

hemind
issue 1: If I upload two image files with the same name in one post, the new one will replace the old one.
issue 2: If I upload image files named "a.1.png" first, then upload "a.2.png", they are both renamed to "a.png" and we have the same problem with issue 1. I think the reason is the first dot cuts the image file name.
Sometimes you got image files with the same name. Of course I can rename such image files, but do I have better solution?
Reply | Threaded
Open this post in threaded view
|

Re: image name issue

GregChapman
As you have discovered, there is no duplicate file name detection, when uploading a file within a post, and a later upload will replace the earlier one. Implicit in your post is that the same filename can be used in other posts and that seems to be right as well as the general format for URLs of uploaded image files is:
http://myforum.nabble.com/file/postnumber/filename.ext

I wasn't aware of the second issue, but I am guessing that the assumption in the code is that there is only one dot in the file name, when generating a filename for a thumbnail image (that needs to be available should the app ever be changed to the Gallery or News type). They get stored at:
http://myforum.nabble.com/file/thumb/postnumber/filename.ext

So I believe that, currently, the only solution for either issue is to rename your files before upload.
Just a Volunteer Nabble Helper - because the nice folk at Nabble have helped me!
GregHelp - Building a set of answers to Nabble FAQs.
Reply | Threaded
Open this post in threaded view
|

Re: image name issue

hemind
Thank you for the explanation!