0

I am trying to replace an old translation of an object with a new translation after replacing the object in my bucket.

I've confirmed the object was replaced by downloading it back.

However, when I make a translate request against the object with the header x-ads-force = True I am receiving a 201 Created response instead of the expected 200.

I am using the .NET Forge SDK for this and while debugging confirmed that the x-ads-force header is set and in the request.

I also checked the translation by loading the viewer just in case it did re translate but it did not. I still see the old view of my document.

I'm not adding a SHA-1 Hash either.

The Scope's I am using are DataRead and DataWrite

Any other troubleshooting methods I should try?

BHosta
  • 25
  • 4

1 Answers1

0

The only time I've seen this issue, it was related to the Viewer caching data of the model and reusing it - not knowing that the model changed.

You can easily verify this by deleting the cache in the browser or using a different browser after translating the newly uploaded file.

I think the easiest way to solve the problem is to add version info (some suffix) to the file name in the bucket.

Adam Nagy
  • 1,700
  • 1
  • 9
  • 14
  • Unfortunately clearing the cache did not help. I expect the problem to be on the actual translate request since the response I am getting is not the correct one. Versioning in the bucket would not be ideal, potentially problematic but if I get no other response I can pursue it. – BHosta Jul 13 '18 at 15:53
  • In your original message I assume you meant that you get a 200 response when using x-ads-force=true and 201 when not using that header. The documentation actually mentions why that is "201 CREATED The requested file type has been previously generated and has not been replaced by the new source file." Another thing you can do to make sure that the translation does take place even without using the x-ads-force header, is by deleting the manifest first: https://developer.autodesk.com/en/docs/model-derivative/v2/reference/http/urn-manifest-DELETE/ – Adam Nagy Jul 16 '18 at 15:27
  • I still have the feeling that it is a browser caching issue - i.e. the translation does take place, but you still see the old graphics. Could you please try looking at the file in a different browser that you did not use before for viewing the file? – Adam Nagy Jul 16 '18 at 15:29
  • I've tried looking at different browsers, and different machines. I still don't get the new file. I do get a 201 when x-ads-force=true that's what is confusing me and why I believe its a problem with the request because as you said I should be getting a 200. – BHosta Jul 17 '18 at 14:07
  • I'll probably start deleting the translations first that would be the most full proof way to go about it, I have no need for the old translations. – BHosta Jul 17 '18 at 14:09
  • "I do get a 201 when x-ads-force=true" Hmm, yes, that does sound strange. I do wonder what you get when not using "x-ads-force" and you just simply delete the manifest (not the actual file) before asking for the translation job - as I mentioned in one of the above comments. – Adam Nagy Jul 18 '18 at 16:15
  • Deleting the manifest and calling translate again produced the correct result. I saw the new translation immediately. That gives me a viable solution. – BHosta Jul 19 '18 at 20:12