Uploading/Downloading a File Using PAR URL

Complete the following steps to upload or download a file using the PAR URL.

Figure 3-1 Get PAR URL


Get PAR URL

  1. Click Drag and Drop to browse and select a file for upload from the local directory.
    You can also browse to the local directory from the File Explorer and select file and drop it here. The file name is automatically updated in the Selected File field.
  2. Enter the Prefix to be added to the file name.
  3. Click Get PAR URL.
    This will generate the PAR URL and File ID which are required in order to upload the file.
    You can also generate PAR URL using Rest API. For more information refer to, Calling the API to Generate the URL .
  4. Copy PAR URL and note the related File ID.
  5. You can upload file content referred with the specific PAR URL into the object store using one of the following options: Console, CLI, or SDK.
    For example, you may use the following curl command directly in local Gitbash.
    curl -X PUT --data-binary '@<local-filename>' <unique-PAR-URL> 
    You can also use the following command.
    curl -T '<Filepath>' -X PUT <PAR_URL>
    You can scan the file referred with the specific File ID (obtained in Step 3) using one of the following options: Console, CLI, or SDK. For example, use the following CURL command to scan the File. Use the File ID.
    curl -k --location --request PUT 'https://<Host:Port>/<Tenant-ID>/utils-service/v1/file/scan/<FileID>' \
    --header 'ofs_tenant_id: <Tenant-ID>' \
    --header 'ofs_service_id: <Service-ID>' \
    --header 'ofs_workspace_id: <WorkspaceId>' \
    --header 'Authorization: Bearer <Generated_Token>'
    A confirmation message is displayed after successful upload and the file is listed in the Uploaded Files list.