PDA

View Full Version : Minor Issue Found


photocroatia
30th of August 2005 (Tue), 06:35
I found a minor bug, it happened a couple of time , I am not sure what the problem is but I think I know whats causing it.

I all started after I wanted to change my file nameing standards to NAME-LOCATION-1.jpg from NAME_LOCATION_1.jpg

My file name is

NAME-LOCATION-1.jpg

When it uploads it gets renamed by EE to NAME_LOCATION_1.jpg

Then I try and upload I think the same filename or different im unsure, the upload screen doesn't pick it up as being duplicate and allows the photos to upload again, and then weird things happen with the order or teh file, duplicates appear adn other weird and wonderful things.

I havent fully worked it out, but I am going back to my old naming convension as EE seems to enforce it anyway.

Thank you

MMCM
2nd of September 2005 (Fri), 17:31
I think it's the same if you upload other formats as JPG, e. g. TIFF, which are converted to JPG automatically. In that case, existing files would be overwritten :-(
Anyway, I used the feature to upload TIFF with my local test server only :-)

Pekka
2nd of September 2005 (Fri), 17:50
Do all operating systems allow hyphen ( - ) in filenames? If so, I can let EE keep it.
Reason for converting TIFF to JPG transparently on upload is that EE is meant for www and TIFF or PSD are not displayable in browsers.

MMCM
2nd of September 2005 (Fri), 18:14
Reason for converting TIFF to JPG transparently on upload is that EE is meant for www and TIFF or PSD are not displayable in browsers.
I know this, and it is ok that way.
BUT: EE checks if there's a TIFF (or PSD, ...) in the database already (not a JPG, which would be the result of the automatic conversion). And if I upload the same TIFF again, it's shown as "not in EE" in the upload file list. As a result, it's not renamed automatically (to prevent duplicates) but the already existing file is overwritten (and there would be duplicate names in the database too).
I noticed this behaviour during my first tests with EE on my local server, but normally, nobody would upload TIFFs in the real world, wouldn't he?

Do all operating systems allow hyphen ( - ) in filenames? If so, I can let EE keep it.

If I use "Save for Web" with Photoshop CS2, it replaces blanks in the (manually entered) filename with a "-" transparently...

MMCM
2nd of September 2005 (Fri), 18:16
P.S. and EE replaces underscores ("_") with blanks... ;-)
(when displaying the filename in the photo header)

Pekka
2nd of September 2005 (Fri), 18:51
I know this, and it is ok that way.
BUT: EE checks if there's a TIFF (or PSD, ...) in the database already (not a JPG, which would be the result of the automatic conversion). And if I upload the same TIFF again, it's shown as "not in EE" in the upload file list. As a result, it's not renamed automatically (to prevent duplicates) but the already existing file is overwritten (and there would be duplicate names in the database too).

EE uses JPG extension for existence check for already uploaded TIFF, TIF, BMP and PSD. When you upload a TIFF and it has not yet been uploaded EE thinks it is not in EE (as it compares it as .JPG to database). But as soon as you upload it it renames is to JPG and if there is such filename it renames it again.

So: if you send xxxxxxx.tiff into upload folder and you already have xxxxxxx.jpg in database, EE shows "--" on "in EE" column. When you upload xxxxxxx.tiff to database, EE renames it to e.g. 461_xxxxxxx.jpg and inserts that in database. This makes sure all filenames are unique.

If it does not work as above then there is a bug somewhere.

I noticed this behaviour during my first tests with EE on my local server, but normally, nobody would upload TIFFs in the real world, wouldn't he?

Well, I like to support that opportunity since Imagemagick can work with TIFF.

Pekka
2nd of September 2005 (Fri), 18:52
P.S. and EE replaces underscores ("_") with blanks... ;-)
(when displaying the filename in the photo header)

That is by design, to help page resize dynamically with very long filenames. I did try using invisible "html hyphen" but that does not work in all browsers, so space is the "safe solution".