PDA

View Full Version : identical photo file name


jeronimo
29th of April 2005 (Fri), 15:02
Hello

I think I read somewhere about it, but can not find it back.

The problem I have is the folow;
When I post photo's from different shoots to my EE site some of the files have the same filename.
I see an option to rename those files after adding them to EE, but that's to late; then I allready created the thumbnails etc. with the same filename as the original.

What is the solution for this?

Greetings
jeronimo

Pekka
29th of April 2005 (Fri), 15:13
EE should do the rename automatically during upload process.

On UPLOAD page, you see a list of uploaded photos on "STEP 2 : select photos from server upload folder". There are several columns on that list, what do you see on "In EE" column after you upload the photos? Does is say "YES"?

If it says "YES", does clicking "RENAME FILES THAT ARE USED IN EE DATABASE" link under that list rename files (i.e. add random three-letter code plus underscore in front of the filename)?

MMCM
29th of April 2005 (Fri), 15:25
In my opinion, EE should have the choice to rename all uploaded photos to the internal photo id automatically.

jeronimo
29th of April 2005 (Fri), 16:04
EE should do the rename automatically during upload process.

On UPLOAD page, you see a list of uploaded photos on "STEP 2 : select photos from server upload folder". There are several columns on that list, what do you see on "In EE" column after you upload the photos? Does is say "YES"?

If it says "YES", does clicking "RENAME FILES THAT ARE USED IN EE DATABASE" link under that list rename files (i.e. add random three-letter code plus underscore in front of the filename)?

Yess I allready did this, the originals are renamed, but not the created thumbnails. So if I will add new ones; they can have the same name as some photo's posted before.....

What MMCM says sounds realy great.
Then I see it as folows;
You upload foto's tho the upload folder.
You select them in the list.
EE does the thumbnailing stuff AND ALSO the renaming straight away (also the original files)

Would be great if it gould be done like that

HMetal
29th of April 2005 (Fri), 17:16
Uhm.. I don't want EE renaming my photos unless I say so. Please, if you make this possible for people that want it, make it an option. I like to keep my original uploaded filenames as reference to my original RAW files.

Pekka
29th of April 2005 (Fri), 17:52
Yess I allready did this, the originals are renamed, but not the created thumbnails. So if I will add new ones; they can have the same name as some photo's posted before.....

What MMCM says sounds realy great.
Then I see it as folows;
You upload foto's tho the upload folder.
You select them in the list.
EE does the thumbnailing stuff AND ALSO the renaming straight away (also the original files)

Would be great if it gould be done like that

Maybe I do not understand what the problem is. It is now exactly like that with EE 1.5 RC4. EE takes care that each uploaded photo id has different filename. If it does not do that for some reason then that it is either a bug or configuration error (e.g. wrong permissions in UPLOAD folder and folders inside it). Or then you upload photos manually without using the exact filenames EE assigned.

Please explain more so that I get the nature of the problem, a step-by-step is the best way to do it.

To rename photo filenames by id is not really needed by any technical reason and I also would like to match filenames to my RAW files.

jeronimo
29th of April 2005 (Fri), 20:01
Ok this is how I do it

First I select the foto's offline on my pc
Then I upload those files to input/upload

Then I go to the upload_to_database page of the admin site.
There i see the uploaded photo's (like PICT0001)
I select eacht photo one by one and select the resize actions.
Then I choose the exhibition
No extra options
And click on upload.

I have to do this one by one because of an time out. That's ok with me for now.

I only am able to rename the files AFTER I did the above procedure. I do this by cliking the rename files that are use in EE database.

But then ONLY the originals are renamed....

I hope this is enough information...

jeroen

PS I checked al the dir's and they are all CMOD 777

jeronimo
2nd of May 2005 (Mon), 02:52
Well small update

I am curently thinking about making a system on my computer where I can dump images to upload later on. So I allready do the renaming stuf on my pc, not serversided. Althoug this is not verry convienient if i post pictures nu from my home pc....

Pekka
3rd of May 2005 (Tue), 11:00
I got your PM and checked it, all works as designed. I think the problem here is semantic, my mistake.

"RENAME FILES THAT ARE USED IN EE DATABASE" does not rename files that are uploaded into database. It renames files in UPLOAD folder, which have identical filename to those found already in EE. Actually, this command is not really needed at all because EE will do the same thing as soon as you HIT upload button, automatically, to ensure there are not overlapping filenames in database. I added the manual rename command for convinience - I think I'll remove it totally.

If you want to change a filename a photo uses, go to photo editor and type the new filename there. This does not change any physical filenames either, you'll need to change the file(s) on disk manually.

In EE you should not worry about filenames at all. It takes care that they are not identical, and it also renames them if they contain spaces or special characters. This is to ensure full browser compatibility and avoid filename conflict problems when moving photos between exhibitions (thumb paths).

For example:


- You send X.jpg to UPLOAD folder.
- You select and upload X.jpg to database.
- After upload the database has photo id 1 as X.jpg, and X.jpg in thumbs and size folders.

- You send another X.jpg to UPLOAD folder. Old X.jpg is overwritten.
- You can see "YES" on "In EE" column next to X.jpg.
- You select and upload X.jpg to database.
- After upload the database has photo id 2 as 7cr_X.jpg, and 7cr_X.jpg in thumbs and size folders. EE renamed file to avoid duplicate.
- Now you can see "YES" on "In EE" column next to 7cr_X.jpg.


The rename prefix is random.

jeronimo
3rd of May 2005 (Tue), 13:33
I got your PM and checked it, all works as designed. I think the problem here is semantic, my mistake.

"RENAME FILES THAT ARE USED IN EE DATABASE" does not rename files that are uploaded into database. It renames files in UPLOAD folder, which have identical filename to those found already in EE. Actually, this command is not really needed at all because EE will do the same thing as soon as you HIT upload button, automatically, to ensure there are not overlapping filenames in database. I added the manual rename command for convinience - I think I'll remove it totally.

If you want to change a filename a photo uses, go to photo editor and type the new filename there. This does not change any physical filenames either, you'll need to change the file(s) on disk manually.

In EE you should not worry about filenames at all. It takes care that they are not identical, and it also renames them if they contain spaces or special characters. This is to ensure full browser compatibility and avoid filename conflict problems when moving photos between exhibitions (thumb paths).

For example:


- You send X.jpg to UPLOAD folder.
- You select and upload X.jpg to database.
- After upload the database has photo id 1 as X.jpg, and X.jpg in thumbs and size folders.

- You send another X.jpg to UPLOAD folder. Old X.jpg is overwritten.
- You can see "YES" on "In EE" column next to X.jpg.
- You select and upload X.jpg to database.
- After upload the database has photo id 2 as 7cr_X.jpg, and 7cr_X.jpg in thumbs and size folders. EE renamed file to avoid duplicate.
- Now you can see "YES" on "In EE" column next to 7cr_X.jpg.


The rename prefix is random.

Well that's an great idee. I can do this in what ever image size I want, even 1 pix big. This way it does not cost me a lot of webspace.

Maybe it's an idea to put this option in future EE?

well thanks for now, realy looking forward to next version, like this gallery better then the rest. you earn a price, nobel price perhaps?

Pekka
3rd of May 2005 (Tue), 13:47
Well that's an great idee. I can do this in what ever image size I want, even 1 pix big. This way it does not cost me a lot of webspace.

Maybe it's an idea to put this option in future EE?

Eh, sorry.. what option?

jeronimo
3rd of May 2005 (Tue), 14:04
Eh, sorry.. what option?

Well an option to give the files an unique ID befor putting them in to the date base? So that there can be no image conflicts?

Pekka
3rd of May 2005 (Tue), 14:32
EE does exactly that in EE 1.5 RC4. That is how it works, now, as I explained.

jeronimo
3rd of May 2005 (Tue), 14:51
Ohw sorry I mis understood about that part. It's some free days off here in the Netherlands, so lot of time to play around and try some things.

Think I found some typo in the dutch translation to, but have to look in tho that more detaild. (it's some kind of failure in the comments of the photo page; see the link
http://www.landmarks.nl/jeronimo/photo.php?photo=30&exhibition=1&pass=public&size=default&lang=nla

Then You see this message
Notice: Undefined index: no_comments_found_photo in /home/landmark/public_html/jeronimo/photo_comment.php on line 770

I do not see this in the english version)

Pekka
3rd of May 2005 (Tue), 15:55
That's a mismatch in translation files. Open /languages/eng/comment.php and languages/nla/comment.php side by side to text editor(s) (Wordpad in you use Windows) and check that nla file has same lines as eng file.

jeronimo
3rd of May 2005 (Tue), 16:11
That's a mismatch in translation files. Open /languages/eng/comment.php and languages/nla/comment.php side by side to text editor(s) (Wordpad in you use Windows) and check that nla file has same lines as eng file.

That's what I plan to do (using dreamweaver)
I you want I can send You the new version