Files
discoursejs/docs/sdk/models/operations/generatepresignedputresponsebody.md

10 KiB
Raw Permalink Blame History

GeneratePresignedPutResponseBody

external upload initialized

Example Usage

import { GeneratePresignedPutResponseBody } from "@lukehagar/discoursejs/sdk/models/operations";

let value: GeneratePresignedPutResponseBody = {
  key: "temp/site/uploads/default/12345/67890.jpg",
  signedHeaders: {},
  uniqueIdentifier: "66e86218-80d9-4bda-b4d5-2b6def968705",
  url:
    "https://file-uploads.s3.us-west-2.amazonaws.com/temp/site/uploads/default/123/456.jpg?x-amz-acl=private&x-amz-meta-sha1-checksum=sha1&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AAAAus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20211221T011246Z&X-Amz-Expires=600&X-Amz-SignedHeaders=host&X-Amz-Signature=12345678",
};

Fields

Field Type Required Description Example
key string The path of the temporary file on the external storage service. temp/site/uploads/default/12345/67890.jpg
signedHeaders operations.SignedHeaders A map of headers that must be sent with the PUT request. {
"x-amz-acl": "private",
"x-amz-meta-sha1-checksum": "sha1"
}
uniqueIdentifier string A unique string that identifies the external upload. This must be stored and then sent in the /complete-external-upload endpoint to complete the direct upload. 66e86218-80d9-4bda-b4d5-2b6def968705
url string A presigned PUT URL which must be used to upload the file binary blob to. https://file-uploads.s3.us-west-2.amazonaws.com/temp/site/uploads/default/123/456.jpg?x-amz-acl=private&x-amz-meta-sha1-checksum=sha1&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AAAAus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20211221T011246Z&X-Amz-Expires=600&X-Amz-SignedHeaders=host&X-Amz-Signature=12345678