changes in attached files

I ran a test where I synced a resource with an attached file. Then I changed the attached file's contents and ran sync again. I went into my library on Zotero and found the resource and downloaded the attached file. What downloaded was the original file, not the changed one. Is there a way to get the sync feature to upload "edited" versions of attached files? Do I have to rename them or something? (I thought maybe the software pointed to the file on my machine so it would pick up the edited copy. Nope.) -- Dawn
  • It should do that automatically as long as the modification time of the local file changes.

    http://www.zotero.org/support/kb/files_not_syncing
  • I did not understand what "modification time of the local file changes" meant, but I went to the link you posted and found this instruction: "On November 24, 1836, the Republic of Texas, by joint resolution to its laws, again provided legal means for the granting of bounty lands to all volunteers who served in the armies of Texas." from Casso, 1992-1993, Dacio Jimenez article" I followed it and the thing is now resyncing, presumably with updates of my files' attachments. Is this something I need to do periodically in order to keep uploading (syncing) new edits of attached files? Or if I know that I have edited an attachment, is there a way to re-upload or sync just that ONE attachment on that ONE file (instead of all of them)? (I sure hope you get this as a reply, Dan!) -- Dawn
  • OK, pardon me! What I pasted in was a note from THAT file! Sheesh! I am so emabarrassed! The actual instruction said to reset the synced files and that is what I did.

    You have my permission to laugh uproariously at my mistake! :-)
  • edited June 22, 2012
    You should pretty much never need to use Reset File Sync History. I suspect if you just tried it again it would work. If not then whatever you're editing the file with probably isn't updating the modification time correctly.
  • How would I be able to check the modification time on the file when it updates? Is there a place I can look for that? (And will having run the Reset File Sync History have messed me all up already?)
  • Just right-click on the attachment in Zotero, click Show File, and look at the modification time as you modify it.

    And no, running Reset File Sync History won't cause any problems—it just shouldn't be necessary.
  • Thank you once again!

    Does it make any difference in the file's updating when I sync if I use the "attach stored copy of file" or the "attach link to file" command? Or will both of those keep updating the file as I edit it?
  • linked files aren't synced by Zotero.
  • Thank you! You are a lifesaver!!
  • OK, at least now I can see where the problem is. The modification time is not changing or updating in the view pane for the attachment in Zotero (on my computer) when I change and save the file on my computer itself. The modification time DOES change there, on the file that's actually on my computer. But it does not change in the attachment window in my Zotero. So now I see why the uploaded or synced copy is not changing, either.

    Do you know how I can fix this, so that when I modify an attachment on my computer the modified version replaces the previous version in my comupter's Zotero file?
  • The time displayed in Zotero doesn't matter. It's the time of the file itself.

    I'm pretty skeptical that this isn't working, but if you provide a Debug ID for a sync after modifying a file (and tell me the (eight-character random) name of the directory containing the file), I'll take a look.
  • I think I did it. It gave me this message: " The Debug ID is D1697879640"

    I have to add some additional information that makes me think you are correct and I am incorrect. This time, before I did anything, I did a search in my online Zotero files for the file I was testing, which is called "Master Calendar". I had initially attached a version and then intentionally added a line of text immediately beneath the title lines in the attachment file. Then I had synced.

    When I did this the first three times, and when I downloaded the file that was attached in Zotero (online), I got the original version of the document, not the edited one.

    But just now, when I tried it again, it downloaded BOTH version of the document -- I think.

    Could it have opened the one in my laptop that is attached to my Zotero files there, as well as opening the one stored online? Does it, instead, store versions and so it opened both of them even though I only clicked on one?

    I am sorry to be so anal about this. I am just working with a large database I keep adding information to in the attached files. And I'm frightened that my updates don't really "exist" in Zotero.

    Thank you for your endless patient help as I figure this out!
  • I am not sure I did that correctly, so I tried again with a different file. The debug ID is D255673214. The file is named "Anglo-Texas Legistlation, List of the General Ordinances and Decrees of the Provisional Government of Texas 1835-1839." The attached file I modified is called Texas Laws, 1835-1839.doc.

    I am not sure what you mean by this, though: "tell me the (eight-character random) name of the directory containing the file". I remember that in Zotero 1.1 there was a number visible in the information pane that matched the file's number for that entry in my storage area. I remember locating things that way when they accidentally got disconnected. But I do not see anything like that in my upgraded Zotero. So I am not sure, still, that I am doing this correctly.
  • I think i'm doing this ALL wrong, and I am about to panic. I found this on the forums: http://forums.zotero.org/discussion/18604/file-syncing-not-working-with-attachments/ where you explained how to find that 8-digit identifier. But I can't figure it out from what's posted there, either. On top of that, it looks to me like my Word documents won't work anyway, that they have to be PDFs (that I guess I make anew, with the same title, every time I modify the word doc?).

    I have been assuming that my updates were at least on the computer here in front of me. Now I'm wondering if all the attachments are "old". That's even scarier than them not being on the server there where you store them via syncing.

    Please explain carefully and clearly. I am starting to get worried and scared ...
  • edited June 23, 2012
    You're fine, relax. To check for the 8-digit code, and to confirm that the file is actually attached to the item in your local Zotero database, do this in the Zotero client (not the website):

    (1) Select the item in the center panel;
    (2) Click the triangle to expose the item's attachments;
    (3) Right-click over the attachment you are interested in;
    (4) Select "Show File"

    This will bring up your operating system's file manager, with the actual file showing in a subdirectory with an 8-digit name. If you find the file there, then you local Zotero has it linked correctly. The 8-digit name is the 8-digit code.

    To check that the local Zotero database you are in is being synced to your online account, visit the Zotero gear menu -> Preferences -> Sync, and check that (1) the Username shown is the same as the one you use to log in at zotero.org; and (2) that the checkbox next to "Sync attachment files in MyLibrary using ..." is checked, and that you are using the "Zotero" method to store the synced attachments.

    To check that your account has enough room for the attachments to sync, visit zotero.org and log in. Then click on "settings", and then "storage". The percentage of your quota that is being used will show at the bottom of the table in that page.

    That pretty much covers everything. If the attachment is present and linked to Zotero, and your database is syncing attachments with the correct Username, and you have room in your account, clicking the green sync icon should sync the copy of the document to the server, and you should find the latest copy in your library on the zotero.org website. If that doesn't happen, it's most likely just a problem with the timestamp on the file, as Dan says.
  • Whew. OK. I will take this one step at a time. :-) Thank you.

    First step: I followed your first set of instructions. At first I was confused because the file was not where I expected it to be; it was in a folder on my hard drive (not in "Library", then "Application Support", and so on). This made me wonder suddenly if it was merely a LINKED file, not a STORED one. So I did the "Attach Stored Copy of File" command and did that -- and the new file icon looked different in Zotero. So I ran the right-click thing you said to do over THAT file and it DID open up a folder in the directory I expected to see! THAT ID (for the folder this is in) is J4FNTUQW. Does that sound right?

    If you don't mind, I am going to stop there and make sure that much is right. Then I will do the next step.

    I am starting to think maybe a lot of my files are merely links -- which I remember now is all I could set up in Zotero 1.1 (which is all I had until this past spring when I finally found a librarian who could help me safely upgrade). I am going to sit here and open them right now, now that I know what the two different icons look like, and see if that is part of the problem. As soon as I hear back from you if I have the first part of this right (the correct file ID number), then I will do step 2.

    Thank you again for helping me get this worked out.

    Dawn
  • OK, feeling less intimidate, I did the other two steps. My storage is at 45.1% (of 1 GB). The sync criteria you listed for Preferences are all as they should be. So steps 2 and 3 also seem to be green. That being the case, I am going to try my test again, making certain that I am checking a stored attachment rather than a linked one. Crossing my fingers . . .
  • IT WORKED! Picture confetti flying through the air!

    I am going to assume the problem was that I had linked attachments in some cases, rather than stored, and that the ones I happened to choose to test were linked. So it did not work.

    But I have learned (a) how to "show files" (for all kinds of reasons that are important), (b) how to make sure I have stored attachments rather than merely links to them, and (c) how to find out important things about my sync function.

    Many MANY thanks!!!! You may mark this case CLOSED at last! :-)
  • I know that feeling (!).

    Glad to hear it's all working. Back to work, enjoy your day. :-)
  • Thank you!!!! :-)
  • I feel terrible about this. But today I went back to the file with which I was originally having trouble. When I tried to open the copy I had stored in my sync files here online, I got this message:

    Last login: Sun Jun 24 13:22:40 on ttys000
    /Users/dawn/Library/Application\ Support/Firefox/Profiles/80zw6jtz.default/zotero/storage/HFU78H7T/1\ master\ calendar ; exit;
    Dawn-Adamss-MacBook-Pro-15:~ dawn$ /Users/dawn/Library/Application\ Support/Firefox/Profiles/80zw6jtz.default/zotero/storage/HFU78H7T/1\ master\ calendar ; exit;
    -bash: /Users/dawn/Library/Application Support/Firefox/Profiles/80zw6jtz.default/zotero/storage/HFU78H7T/1 master calendar: cannot execute binary file
    logout

    [Process completed]

    I thought I had this problem licked, but now it seems worse than it was before. Before I could at least see the file, though it did not update.

    Please advise.
  • edited June 25, 2012
    Files without extensions very well might not open properly on synced computers. Give the file a proper extension (e.g., .doc) and relink it in Zotero by trying to open it and, when you get an error that it's missing, locating the renamed file. You can alternatively click the attachment title in the right pane of Zotero and rename it from the window that pops up with "Rename associate file" checked.

    (Other people have reported this, but I'm not exactly sure what causes this. I can't reproduce it in Lion using a Word document without an extension—syncing that file down and opening it opens it in Word.)
  • Well, you're right about needing the .doc extension. When I add that, the file works. But now I'm having the same problem I had before, of it not picking up the edits when I make them. :-(

    I think I'll just have to store the file backups another way, darn it. As long as I link to them from my Zotero and keep copies of those attachments in another system for backup, at least I shouldn't lose my work.

    Thanks for all the help you've all given me as I've tried to figure this out! I suspect I've simply got several different problems that are making it difficult to parse out why it works some times and not on others.
  • Backups are always good.

    You can check the timestamp by viewing the file with "Show File" and then viewing its Properties.

    (Just in case, the version to edit is the one shown with "Show File", of course, not the file wherever it was in your filesystem before you appended it to the Zotero item.)
Sign In or Register to comment.