Sign in to follow this  
Followers 0

Where in my code,, to get Filesize(path)

2 posts in this topic

It be nice... to know the zipFile()  size stored in a container field?


I tried a number of combinations , in my code already nothing returning any thing close

to the remote DL, and unzip.. then knowing the actual size of zipped file



1st, I Copy As,  my filemaker fmp12 file to a folder..  There I know the original filesize

Then I am zipFile, setting a Container field with the zip file.. viewing it on a layout, 


[[[   I want to preview the file on layout here first, know how big it is... ]]]


I can do both email attach and Ftp the file..

Ftp is fast..
I am not certain. email is a winner yet!


Then NEXT, a button

The container is the ftpeek ftp to a remote location server



$goPath       is the full path... ie..

Attached my code



Share this post

Link to post
Share on other sites

no big thing unanswered, ..i guess i figure it later  .i am pretty stupid sometimes,, need a mentor to blast theses stupid questions often too,,  i am not the only stupid programmer here hacking to make something work or work around,  My hat is off to the  bright folks hanging out here,,


Share this post

Link to post
Share on other sites

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
Sign in to follow this  
Followers 0

  • Similar Content

    • Photos reduced in size by GetThumbnail appear to take up more storage on FMGo 14 than in OS X
      By folks
      I wonder if the storage for the images remains at the size of the original image taken by the iPad camera
      in spite of the replacement of that image by a much smaller thumbnail.  
      From the isolated tests below ( with attached example db )
      it looks like some of the storage in FMGo14 is recovered but not all, double what it should be.
      Also the overhead per container record appears to grow in a non linear manner on both FM OS X and FMGo14.
      Adding photos directly in FM on OS X appears to recover much of the storage that was not recovered in FMGo14.
      Unfortunately, only when another photo is added.  In my solutions all photos are added in FMGo14 so storage
      size grows quite rapidly  :  (
      The thumbnails are typically smaller than 1.1MB while the storage consumed for each image within
      the database appears to be average to 3.67 MB
      If this theory holds water how to I get the extra storage back as this is causing some real problems
      with sync times.
      calculation for container field
      // If the content of the container is an image shrink without distortion so max dimension is 1920
      // if it is not an image then return self. This would apply to audio, files and music
      // if image has a largest dimension that is less than 1920 then just use image do not attempt to enlarge image.
      If ( PatternCount  ( GetContainerAttribute ( Media;"filename" ) ; ".jpg" )  or
          PatternCount  ( GetContainerAttribute ( Media;"filename" ) ; ".png" )  or
          PatternCount  ( GetContainerAttribute ( Media;"filename" ) ; ".bmp" ) or
          PatternCount  ( GetContainerAttribute ( Media;"filename" ) ; ".gif" )    or
          PatternCount  ( GetContainerAttribute ( Media;"filename" ) ; ".tif" )
                  GetThumbnail (
                                          Self ;
                                          If ( GetWidth ( Self ) <  1920 ; GetWidth ( Self ) ; 1920 ) ;
                                          If ( GetHeight ( Self ) <  1920 ; GetHeight ( Self ) ; 1920 )
                                        ) ;
      Isolated Tests
      Created ContainerPhotoTest filemaker db with a single table and single field Media with
      GetThumbnail calculated result
      Move to iPhone 5s FMGo14 take photo
      ContainerPhotoTest  197 k with no photo
      ContainerPhotoTest  1.7MB with single photo
      Export Photo to desktop from Container
      Photo Size 467 KB
      But the database storage size has increased by 1.699 MB
      Add 8.6MB .jpg from the desktop in a second record
      ContainerPhotoTest  1.3 MB in size
      Drag photo to desktop from container
      Photo Size 623 KB
      ( 197 k + 467 k + 623 k ) = 1287 k 
      1,300 k - 1287 k = 13 k extra space used.
      What is happening here.
      So it looks like it works fine on OS X but perhaps not on iOS
      Try again with iPad Air 2 iOS
        • ContainerPhotoTest  1.3 MB in size
        • Take photo from FMGo14 Container
        • Take similar photo on iPad camera app
        • Photo Size 2.6 MB
        • ContainerPhotoTest 2.1MB in size
        • photo 800 k size increase
        • Photo size 467 k
        • Close and reopen FMGo14
        • ContainerPhotoTest 2.1MB in size
      So it seems that in iOS some space is recovered on the photo re-size but not all.
      Final Test on OS X
        • Create new record and.
        • ContainerPhotoTest 2.1MB in size
        • drop similar photo 2.2 MB into container from desktop
        • ContainerPhotoTest still 2.1MB in size, no increase in size...
        • Quit and re open database
        • ContainerPhotoTest still 2.1MB in size
        • drag new photo to desktop 467k
      ( 197 k + 467 k + 623 k + 467 k ) = 1754 k
      2,100 k - 1754 k =  345 k extra space used
      So it looks like something different is happening on OS X and FMGo
      I need to gather data including photos on FMGo and in practice as noted
      in the initial description of the production solution where no photos are added in OS X file size grows
      quite quickly.