Upload a large file in separate parts - SmartPlant Foundation - IM Update 44 - Customization & Programming - Hexagon

SmartPlant Foundation Customization

Language
English
Product
SmartPlant Foundation
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
10

You can upload a large file using the following POST:

http://[host]/[server]/api/v2/FileMgmt/UploadFile

This POST contains a single file part along with the following query parameters:

type=resume&part=n

checksum=77f0d7b7b9d6450e922c

You can upload a large file in separate parts using the following steps:

  1. POST an UploadFile request using the query parameters type=resume and part=1.

    Obtain the UploadId from the response.

  2. POST an Upload request using the query parameters type=resume, uploaded=[uploadid], and part=[n].

    Obtain the UploadId and the part number increments for each upload part from the response.

  3. Repeat the previous step for each subsequent file part.

  4. POST an UploadFile request using the query parameters type=commit, uploaded=[uploadid]

The requests all respond in the same way with a 200 response status code in the following JSON format indicating success:

{

"UploadId": "77f0d7b7-b9d6-450e-922c-5c84dc869442",

"Expires": "2016-07-18T07:16:28.505Z"

"Checksum": "77f0d7b7b9d6450e922c",

}