Reputation: 1397
I am using autodesk Forge to to a post job to create a thumbnail. Below is the body of the httpheaders that I am sending.
{ "input" :
{ "urn":"urnNum",
"compressedUrn" : true,
"rootFilename" : "RodDesign"},
"output" :
{ "destination" : { "region" : "us"},
"formats" : [{"type":"thumbnail"}]
}
}
The status code is 200, but it gives back the response :
Failed to download the design description for the input design.
I am not sure how to interpret this. I don't know if it's a problem with data that I have sent or there is an issue with the file I am trying to access, or something else.
Any help is appreciated.
Upvotes: 2
Views: 158
Reputation: 5342
Your rootfilename
should be complete with extension name and match exactly the model file in the archive:
{ "input" :
{ "urn":"dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bW9kZWxkZXJpdmF0aXZlL0E1LnppcA",
"compressedUrn" : true,
"rootFilename" : "RodDesign.rvt"},
"output" :
{
"formats" : [{"type":"thumbnail"}] //output region defaults to US so no need for it here
}
}
If your model file has no extension name then our engine won't be able to determine which extractor to dispatch it to - our translation engine ID the type of a model file based on the its extension name (e.g. rvt, dwg etc).
Also make sure the archive is completely uploaded to the bucket - query the object details using GET buckets/:bucketKey/objects/:objectName/details and check its size and SHA1 (may use this to calculate for your local files and the digests should be identical for the same contents) readings.
EDIT
What is an archive?
ZIP, RAR, TAR etc.
Why do we need to use a file name with an extension when we are giving it a urn - which should be a unique identifier from which an entry is pulled that tells the reader the type of file? I don't see a file type in the forge data. How do we determine this programmatically?
If you are translating a design file directly and not an archive (see here for what that means) then leave the compressedUrn
and rootFilename
out. See tutorial here for details.
How do we know if the file is compressed? If the code needs to extension of the root file name to send it to the right extractor, why isn't that needed for a file that isn't compressed?
Of course our translation service requires that the model files in the bucket to have the correct extension name so it can dispatch them to the correct extractor.
How do I know the format of the file? What is the default for Fusion 360? How do I know if I have the format correct and there is just another error producing the same message?
That'd be f2d for 2d drawing and f3d for 3d models. You can always google to find answers for the correct extension names.
Is this a problem with finding the source file and how do I address that?
You will need to make sure that the model file in the bucket has the correct extension name otherwise it won't get dispatched to the corresponding extractor and hence the error.
Upvotes: 1