[Pro] Why change image filename case?

Recently, I was trying to work through some scripting issues and discovered a behavior of Freeway Pro I had never noticed before. It’s fairly harmless… when I was trying to track down why my script was only working some of the time, I noticed that Freeway Pro was making changes to the filenames of images I was using as background images.

Nothing drastic, just that it made the names all lower-case, which broke my script on the more case-sensitive server (but oddly not when working on my local machine). Easy enough to fix (just re-write my script). But understanding what was happening still does not give me the why of it.

Does case have any real importance in the file naming conventions of images? Especially given these image resources exist in a folder whose name itself is capitalized?

http://cssway.thebigerns.com/products/pattern-viewer/


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

At 02:11 -0500 1/12/12, The Big Erns wrote:

Recently, I was trying to work through some scripting issues and
discovered a behavior of Freeway Pro I had never noticed before.
It’s fairly harmlessŠ when I was trying to track down why my script
was only working some of the time, I noticed that Freeway Pro was
making changes to the filenames of images I was using as background
images.

Nothing drastic, just that it made the names all lower-case, which
broke my script on the more case-sensitive server (but oddly not
when working on my local machine). Easy enough to fix (just re-write
my script). But understanding what was happening still does not give
me the why of it.

The HFS+ filesystem used by Mac OSX is case insensitive but case
retaining. That means that when creating files they are created as
you specify with respect to case, but when you refer to a filename
that matches an existing one with case ignored, the pre-existing name
is substituted.

You can specify that the filesystem is fully case sensitive when you
create the volume, but that could break some software that isn’t
carefully written.

David


David Ledger - Freelance Unix Sysadmin in the UK.
email@hidden
www.ivdcs.co.uk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’m not sure what rules Freeway follows in this area, and there may be specifics about your case that are affecting the outcome. As Dave pointed out, the Mac filesystem may be implicated, but I believe that this means that (unlike a traditional Unix server, a set which Mac OS X is a subset of) you cannot have file.txt and File.txt in the same folder. Freeway will certainly not break that rule when saving your files locally, which means that you won’t ever end up with that combination on your server, even though the server would have no trouble with that.

Further, Freeway steps around files it doesn’t “know about” from the perspective of the document doing the publishing. If you have two documents publishing into the same site folder, you will end up with item1.jpeg and item1a.jpeg, even if there is only one item1 in each document.

But changing the case of filenames is another matter. I am pretty sure that if it’s a pass-through image, barring a collision as described above, that will never happen. I haven’t tested this, but I believe that it’s correct. If it’s a normal image, Freeway is probably following its normal file naming algorithm (removing spaces and various illegal characters from the given name and down-casing the lot).

Walter

On Dec 1, 2012, at 2:11 AM, The Big Erns wrote:

Recently, I was trying to work through some scripting issues and discovered a behavior of Freeway Pro I had never noticed before. It’s fairly harmless… when I was trying to track down why my script was only working some of the time, I noticed that Freeway Pro was making changes to the filenames of images I was using as background images.

Nothing drastic, just that it made the names all lower-case, which broke my script on the more case-sensitive server (but oddly not when working on my local machine). Easy enough to fix (just re-write my script). But understanding what was happening still does not give me the why of it.

Does case have any real importance in the file naming conventions of images? Especially given these image resources exist in a folder whose name itself is capitalized?

thebigerns.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks to both of you for explaining how OSX and the server handle
filenames. I was still curious as to why Freeway Pro changed the image
names – so I ran a small experiment to see if I could deduce it’s rules.

http://cssway.thebigerns.com/workbench/image-filenames/

It seems that in most cases, Freeway Pro will translate the image filename
to lowercase, remove ‘suspicious’ characters (like @ and #) then truncate
the filename to 17 characters plus extension. Except in the case of Pass
Through images, where it seems to make no alteration at all. To be fair,
and as you can see in my example page, I did not attempt very extreme
tests.

So, there it is. Next time I should not be so presuming when attempting to
write scripts for use in FWP.


Ernie Simpson

On Sat, Dec 1, 2012 at 12:07 PM, Walter Lee Davis email@hiddenwrote:

I’m not sure what rules Freeway follows in this area, and there may be
specifics about your case that are affecting the outcome. As Dave pointed
out, the Mac filesystem may be implicated, but I believe that this means
that (unlike a traditional Unix server, a set which Mac OS X is a subset
of) you cannot have file.txt and File.txt in the same folder. Freeway will
certainly not break that rule when saving your files locally, which means
that you won’t ever end up with that combination on your server, even
though the server would have no trouble with that.

Further, Freeway steps around files it doesn’t “know about” from the
perspective of the document doing the publishing. If you have two documents
publishing into the same site folder, you will end up with item1.jpeg and
item1a.jpeg, even if there is only one item1 in each document.

But changing the case of filenames is another matter. I am pretty sure
that if it’s a pass-through image, barring a collision as described above,
that will never happen. I haven’t tested this, but I believe that it’s
correct. If it’s a normal image, Freeway is probably following its normal
file naming algorithm (removing spaces and various illegal characters from
the given name and down-casing the lot).

Walter

On Dec 1, 2012, at 2:11 AM, The Big Erns wrote:

Recently, I was trying to work through some scripting issues and
discovered a behavior of Freeway Pro I had never noticed before. It’s
fairly harmless… when I was trying to track down why my script was only
working some of the time, I noticed that Freeway Pro was making changes to
the filenames of images I was using as background images.

Nothing drastic, just that it made the names all lower-case, which broke
my script on the more case-sensitive server (but oddly not when working on
my local machine). Easy enough to fix (just re-write my script). But
understanding what was happening still does not give me the why of it.

Does case have any real importance in the file naming conventions of
images? Especially given these image resources exist in a folder whose name
itself is capitalized?

http://cssway.thebigerns.com/products/pattern-viewer/


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I find it useful to avoid using the filename for anything important. I have been burned in this manner in the past. If I have full round-trip control over the filename (say, in a server-side application where I am managing the files within my own code) then I know I am free to depend on that metadata. But in most other cases, it is best to use a classname or a data-attribute or a rel attribute to send important metadata around the application.

Walter

On Dec 3, 2012, at 3:55 AM, Ernie Simpson wrote:

So, there it is. Next time I should not be so presuming when attempting to
write scripts for use in FWP.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You can change this length in the Document Setup / Output area. It’s 21 characters (17, dot, file-type extension, in the case of png or gif; jpeg only gets 16) by default, you can make it up to some really high limit, I forget exactly what.

Walter

On Dec 3, 2012, at 3:55 AM, Ernie Simpson wrote:

then truncate
the filename to 17 characters plus extension.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Next time I should not be so presuming when attempting to write scripts for use in FWP.

If you had used either the Upload Stuff (Page) or Extra Resources (Item) action then these files could have been uploaded with their file names unaltered.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

True, and it really wasn’t as much a problem as not understanding what the
problem was. Alternately, I could also use a non-linked page in FWP to
place all the images as Pass Through images, which would also put them
unaltered into the Resources folder.


Ernie Simpson

On Mon, Dec 3, 2012 at 3:09 PM, DeltaDave email@hidden wrote:

Next time I should not be so presuming when attempting to write scripts
for use in FWP.

If you had used either the Upload Stuff (Page) or Extra Resources (Item)
action then these files could have been uploaded with their file names
unaltered.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I must admit that if I have files to be accessed like your bgs, downloads etc. I prefer to take the responsibility of handling them away from FW totally.

Transmit is my friend in that respect and I have the opportunity to put them on my server exactly where I know where to find them and separate from FW’s output.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options