Skip to main content
Skip to main content

AdminUploadsResource

admin/uploads.AdminUploadsResource

Properties

headersobjectRequired
headers.Content-TypestringRequired

Default: `"multipart/form-data"`

Methods

_createPayload

Private _createPayload(file): FormData

Parameters

Returns

FormData


create

create(file): ResponsePromise<AdminUploadsRes>

Parameters

File or array of files to upload.

Returns

ResponsePromise<AdminUploadsRes>

ResponsePromiseResponsePromise<AdminUploadsRes>Required
Uploaded file or files.

Description

Uploads at least one file to the specific fileservice that is installed in Medusa.


createProtected

createProtected(file): ResponsePromise<AdminUploadsRes>

Parameters

File or array of files to upload.

Returns

ResponsePromise<AdminUploadsRes>

ResponsePromiseResponsePromise<AdminUploadsRes>Required
Uploaded file or files.

Description

Uploads at least one file with ACL or a non-public bucket to the specific fileservice that is installed in Medusa.


delete

delete(payload, customHeaders?): ResponsePromise<DeleteResponse>

Parameters

payloadAdminDeleteUploadsReqRequired
customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<DeleteResponse>

ResponsePromiseResponsePromise<DeleteResponse>Required

getPresignedDownloadUrl

getPresignedDownloadUrl(payload, customHeaders?): ResponsePromise<AdminUploadsDownloadUrlRes>

Parameters

customHeadersRecord<string, any>Required

Default: `{}`

Returns

ResponsePromise<AdminUploadsDownloadUrlRes>

Was this section helpful?