Error when uploading a new version to BIM360 from Forge

Error when uploading a new version to BIM360 from Forge

mahmoudhafezfarag
Explorer Explorer
439 Views
0 Replies
Message 1 of 1

Error when uploading a new version to BIM360 from Forge

mahmoudhafezfarag
Explorer
Explorer

Hey, I am using dot Net Core to make some edits in some elements properties in Forge and trying to apply those changes to BIM360 Revit file by adding a new version, and getting that error.

The new version's MIME type must match the previous version's MIME type

 

Here is the response I am getting.

{"Error calling PostVersion: {\"jsonapi\":{\"version\":\"1.0\"},\"errors\":[{\"id\":\"6f0083d4-31b9-4814-a7c5-53ebc6a3cf96\",\"status\":\"400\",\"code\":\"ERR_WIP_ERROR\",\"title\":\"VER_MISMATCH_MIMETYPE\",\"detail\":\"The new version's MIME type must match the previous version's MIME type.\"}]}"}

 

Here is the code I am using for that 

VersionsApi versionsApis = new VersionsApi();
versionsApis.Configuration.AccessToken = Token;
CreateVersion newVersionData = new CreateVersion
(
new JsonApiVersionJsonapi(JsonApiVersionJsonapi.VersionEnum._0),
new CreateVersionData
(
CreateVersionData.TypeEnum.Versions,
new CreateStorageDataAttributes
(
fileName,
new BaseAttributesExtensionObject
(
"versions:autodesk.bim360:File",
"1.0",
new JsonApiLink(string.Empty),
null
)
),
new CreateVersionDataRelationships
(
new CreateVersionDataRelationshipsItem
(
new CreateVersionDataRelationshipsItemData
(
CreateVersionDataRelationshipsItemData.TypeEnum.Items,
itemId
)
),
new CreateItemRelationshipsStorage
(
new CreateItemRelationshipsStorageData
(
CreateItemRelationshipsStorageData.TypeEnum.Objects,
storageId
)
)
)
)
);
dynamic newVersion = await versionsApis.PostVersionAsync(projectId, newVersionData);

0 Likes
440 Views
0 Replies
Replies (0)