v1

latestOpenAPI 3.0.12026-07-245752052.0 MB
storedFiles

Upload one or two files from a publicly accessible URL to our object storage. The combined file must not exceed 15MB.

post/api/servicemedia/processes/files/{storageFolder}/url/upload

Path parameters

storageFolderstring required

target storage folder

Request body

fileUrlstring required
fileUrlBackstring

Optional back of the uploaded file to try and concatenate in a single uploaded file. Only available for image formats (jpg or png).

workerUuidstring uuid

Only needed when using a worker-related file storage option

Example request

{
  "fileUrl": "https://picsum.photos/50",
  "fileUrlBack": "https://picsum.photos/51",
  "workerUuid": "306c0281-eb9d-47bc-9688-c248d3e9061d"
}

Response

The created storedFile db document

Example response

{
  "data": {
    "uuid": "f4428d27-c089-40c4-aa83-ce02e1ee1426",
    "createdAt": "2021-05-05T01:02:03.924Z",
    "createdBy": "1e4e9128-fbb2-4b0a-97fc-f65bb1efee55",
    "lastUpdatedAt": "2021-05-05T04:05:06.924Z",
    "lastUpdatedBy": "7097bb82-61bd-4724-82ac-eab598190e47",
    "lastUpdatedByAudience": "employer",
    "lastUpdatedByAudienceUuid": "68df4316-590a-4081-9f24-9d9311977c9d",
    "lastUpdatedByImpersonatedBy": "3462e1d4-0e27-4798-b4a2-76412ab21892",
    "lastUpdatedByCompanyUuid": "d310aada-b1ad-4e9a-b822-b90c3cdb65bb",
    "lastUpdatedByEnterpriseUuid": "a6420cdc-285a-4f75-8ccc-8edff6d60c0a",
    "name": "Profile pic.png",
    "technicalName": "profile_pic.png",
    "location": {
      "bucket": "s3-bucket",
      "key": "/companies/f3c6a46d-c509-4443-b6b6-c89fbf7d4e81/tmp/a510a9a1-8ec5-4e86-af17-9a8ef30bf269"
    },
    "companyUuid": "2c84a7c1-4c68-41d8-9376-2a14c60de15f",
    "folderUuid": "bfd74d74-0ee2-48dc-ad22-76028e8b63d2",
    "metadata": {
      "size": 2048,
      "mimeType": "application/octet-stream",
      "type": "application",
      "extension": "bin"
    }
  },
  "meta": {
    "timestamp": "2021-05-05T09:47:58.924Z",
    "verb": "GET",
    "path": "/api/structure/resources/5949cf7c-fec6-4b31-947c-3aceabff58c5",
    "jti": "%cQN3RIGp",
    "rid": "$2d2zkHZ5",
    "count": 1,
    "status": "200",
    "duration": 17,
    "size": 1234
  }
}