Jump to content
Server Maintenance This Week. ×

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


MrG

This topic is 2766 days old. Please don't post here. Open a new topic instead.

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
Link to comment
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.

Link to comment
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
Link to comment
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.

Link to comment
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
Link to comment
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.

 

Link to comment
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?

Link to comment
Share on other sites

This topic is 2766 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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