1 Reply Latest reply on Jan 28, 2013 11:13 AM by craig.mcclanahan

    Binary data URL not updated for Version for File

      Hi ,

       

      I have been trying to get the input stream for different version of a file which have different attachment.The binary data url does not get update for different files.

       

      Following are the steps I did.

      1) Created a space

      2) Uploaded a file with a simple image as attachment, description : version 1 image1

      3) Clicked Edit , removed the attachment and uploaded the file with another simple image description : version 2 image2

       

      Querying the JSON

      1) I queried  for list of file in the space , and got a the space JSON response.

      2) I took the content url and added &filter=type(file). I got the list of file

      3) Copied version url , got the version JSON list with 2 JSON version 1,version2

      4) The binary data URL is not getting changed for both the JSON version. It should change.

       

      Request Jive support to look into this case.

       

      Note : The binary url is getting changed for different version of Document with different attachments.

       

      Regard

      Shiv Shankar

        • Re: Binary data URL not updated for Version for File

          The Core API for dealing with binary documents ("files" in the API documentation) follows the same restrictions as accessing things in the Jive UI.  You can only access the binary content of the current version of the document.  If you want to access the binary content of a previous version, you have to restore the old one:

          • From the UI, click "Manage Versions", then restore the older version that you want
          • From the API:
            • Retrieve the file
            • Follow the "versions" URI to get the available versions
            • Do a POST to the "self" resource of the version you want to restore

          Note that, when you restore using either method, you're actually creating a new version.  This time, though, the data URL will retrieve the previously uploaded content since that is now the current version -- even though the URL does not change.