Reputation: 4648
The Forge API https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-PUT/ has a clear method for overwriting an existing object with the same filename - the If-Match
header.
I'm using the Using the C# API found at https://github.com/Autodesk-Forge/forge-api-dotnet-client and I'm calling UploadObjectWithHttpInfo
to upload a new revision of a file (and setting the ifMatch
parameter with the correct SHA1 hash that I saved from the previous upload). The 'new revision' is nothing more than the exact same file with a very noticable door on the south side of the building deleted. Checking the files visually in Revit 2017 shows that they are different. I'm using the same filename as the previous version of the file.
If I don't supply the correct SHA-1, the API correctly responds with HTTP 412. If I do supply the SHA-1 correctly, the API responds with the expected results, including a new SHA-1 (which I save). The document URN does not seem to change.
I immediately call another Translate job on this file (which succeeds very quickly), wait a few minutes, and navigate to the viewer page which loads the document URN.
The viewer shows the first revision of the file, with the door still present.
What am I missing?
Upvotes: 0
Views: 133
Reputation: 5342
If the URN wasn't changed after translating the revisions, please add the following header to force the service to regenerate all viewables:
x-ads-force: true
Checked and found this was working for the others. See here, here, here and here.
Another thing you might wanna try is to delete the manifest before you fire the job. And also don't let browser cache be the pitfall here.
Upvotes: 1