Jump to content
Sign in to follow this  
MrG

Why doesn't FM append .zip to a compressed file imported to a container field?

Recommended Posts

Why doesn’t FM append .zip to a compressed file, imported to a container? When import files to a container field with choice "compress if possible" the file "inside" the container will be zipped , but the container "file name” doesn't append .zip in the file name.

Should it be more logical to append .zip when the file is imported as compressed, just to tell that it is?
And only keep original file ending if not compressed.

Example
MyFile.pdf to MyFile.pdf.zip when imported as compressed...

Edited by Lee Smith
Modified the Subject

Share this post


Link to post
Share on other sites

afaik, the compression isn't a .zip

Share this post


Link to post
Share on other sites
7 hours ago, MrG said:

 

Example
MyFile.pdf to MyFile.pdf.zip when imported as compressed...

Not really, AFAIK FM compresses the file for its own use to save on storage.  It is not meant to make the compressed file available to you.

Share this post


Link to post
Share on other sites
Quote

It is not meant to make the compressed file available to you.

To whom should the file be "available", if not to the users?

Lets say you have 300 post of container-fields where 50% of them is compressed. How should you know which one?

Edited by MrG

Share this post


Link to post
Share on other sites
26 minutes ago, MrG said:

To whom should the file be "available", if not to the users?

To the hard disk. If you have inserted an uncompresed file into a container field, then you can only retrieve the original, uncompressed, file. How Filemaker stores the file in the interim is between it and the OS file system.

Share this post


Link to post
Share on other sites

The issue is also about how to "see" which one of the posts who has a container-field who have compressed file, or not

Share this post


Link to post
Share on other sites

why would you care?  As @comment says: it's FMS' decision to compress or not compress to facilitate storage.  It will always give you back the original if you ask for it; never the file as it stores it.

 

Share this post


Link to post
Share on other sites
50 minutes ago, MrG said:

The issue is also about how to "see" which one of the posts who has a container-field who have compressed file, or not

I am afraid I don't understand this issue. I suppose you could compare the container field's internalSize attribute against its fileSize and make an educated guess regarding the compression - but I don't see what practical purpose would be served by this.

 

Edited by comment

Share this post


Link to post
Share on other sites
Quote

why would you care?

Ie, if you have DB register with attachment, who has been send out with e-mails, you later perhaps want to find all posts with container who include files that not is compressed and trough them away.

If compression is .zip or .gzip or something else, do not mater if "something" is ending the file names who is imported as "compressed (if possible)".
Isn't that logical?

here is more about this issue, posted 2014.

 

Share this post


Link to post
Share on other sites

I'm afraid I don't follow your logic.  Whether the file was compressed or not by FM shouldn't matter to you.   I don't see why your cleanup routine would need/want to check whether a file is compressed or not?

If I follow your logic I would keep a record whose file is 4GB but zipped by FM but throw away a file that is 1KB but not zipped?  Would you not want to set the criterium on size alone, regardless of how FM decided to store the file?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.