Your best friend for file transfer.

Fetch application logoFetch

mirror command keeps re-uploading images (2 posts)

This is an archived topic. The information in it is likely to be out-of-date and no longer applicable to current versions of Fetch.
  • Started 10 years ago by unlox775
  • Latest reply 10 years ago from Jim Matthews
  • unlox775 Member

    Hello,
    I have been using Applescript and the mirror command to synchronize photos exported from iPhoto with my online photo album. I have the Applescript all working, and it does indeed synchrinize the from and to locations, but the problem is that it constantly seems to think that the images have changed or something becuase it re-uploads them every time.

    The bytes that the LIST command returns for my example file (040413lily1.jpg) says that it is 3931 bytes, as does the Get Info command in the Finder on the same file. Does it check more than just the bytes? The timestamps are not the same, I think the FTP server I'm working with doesn't allow utime calls. (I tried checking the Prefs->Misc->Dont Preserve Modification dates but that didn't seem to change things one way or another)

    This is the transcript excerpt:

    230 Welcome [buchanan.i8.com].
    SYST
    215 UNIX Type: L8
    PWD
    257 "/"
    MACB ENABLE
    500 Unrecognized command.
    CWD grandparents/images/albums/cousins_th
    250 Changed directory OK.
    PWD
    257 "/grandparents/images/albums/cousins_th"
    PASV
    227 Entering Passive M(208,185,127,174,133,3)
    LIST
    150 Opening data connection for file listing.
    total 1
    drwx------ 2 ftpuser www 4096 May 19 13:45 .
    drwx------ 11 ftpuser www 4096 May 13 23:19 ..
    -rw------- 1 ftpuser www 3931 May 19 13:46 040413lily1.jpg
    -rw------- 1 ftpuser www 4095 May 19 13:46 040413lily2.jpg
    -rw------- 1 ftpuser www 4562 May 19 13:46 040413lily3.jpg
    -rw------- 1 ftpuser www 5348 May 19 13:46 040506meg.mo.bench.jpg
    -rw------- 1 ftpuser www 5864 May 19 13:46 040506meg.mo.bench.tree.jpg
    -rw------- 1 ftpuser www 5216 May 19 13:46 040516_P5160038.jpg
    -rw------- 1 ftpuser www 5448 May 19 13:46 040516_P5160041.jpg
    -rw------- 1 ftpuser www 5273 May 19 13:46 040516_P5160050.jpg
    -rw------- 1 ftpuser www 6098 May 19 13:46 040516_P5160057.jpg
    -rw------- 1 ftpuser www 4651 May 19 13:46 040516_P5160059.jpg
    -rw------- 1 ftpuser www 4571 May 19 13:46 040516_P5160060.jpg
    -rw------- 1 ftpuser www 5321 May 19 13:46 040516_P5160061.jpg
    -rw------- 1 ftpuser www 5092 May 19 13:46 040516_P5160062.jpg
    -rw------- 1 ftpuser www 4718 May 19 13:46 040516_P5160070.jpg
    -rw------- 1 ftpuser www 3905 May 19 13:46 040516_P5160072.jpg
    -rw------- 1 ftpuser www 4602 May 19 13:46 040516_P5160074.jpg
    -rw------- 1 ftpuser www 3784 May 19 13:46 040516_P5160077.jpg
    -rw------- 1 ftpuser www 2801 May 19 13:45 2004-04.html
    -rw------- 1 ftpuser www 2482 May 19 13:45 2004-05.html
    226 Listing complete. Data connection has been closed.
    MDTM 040413lily1.jpg
    213 20040519134638
    TYPE I
    200 TYPE changed to I.
    PASV
    227 Entering Passive M(208,185,127,174,133,4)
    STOR 040413lily1.jpg
    150 Opening BINARY mode data connection for file 040413lily1.jpg.
    226 File store complete. Data connection has been closed.
    Upload complete at 5/19/04 1:48:30 PM
    MDTM 040413lily2.jpg
    213 20040519134639
    PASV
    227 Entering Passive M(208,185,127,174,133,5)
    STOR 040413lily2.jpg
    150 Opening BINARY mode data connection for file 040413lily2.jpg.
    226 File store complete. Data connection has been closed.
    Upload complete at 5/19/04 1:48:31 PM
    MDTM 040413lily3.jpg
    213 20040519134640

    Posted 10 years ago #

  • Jim Matthews Administrator

    Fetch checks the modification dates of the file on your Mac and the corresponding file on the server to see if it needs to be uploaded. In this case the server said that its copy of 040413lily2.jpg had been modified at 1:46:38 PM UTC on May 19, 2004. The copy on your Mac had a later modification date, so Fetch uploaded it.

    I think the problem is that the server is quoting the wrong modification time to Fetch. Specifically, it's quoting the time in the local time zone, in response to a command (MDTM) that is supposed to return the time in UTC (also known as GMT, Greenwich Mean Time, 4 hours ahead of Eastern Daylight Time). So the server says "this file was modified when it was 1:46 PM in Greenwich, England, i.e. some number of hours ago" and Fetch thinks it needs to upload again.

    If this is the problem Fetch will keep uploading the file until you haven't changed it on your local computer for X hours, where X is the number of hours that UTC is ahead of your local time.

    You might inform the server administrator that their FTP server is returning local times in response to the MDTM command, and that it should return UTC times.

    I hope this helps,

    Jim Matthews
    Fetch Softworks

    Posted 10 years ago #

Topic closed

This topic has been closed.