# dce_uploads.createmultipartupload: Discourse Package for Uploads operations that could not be mapped to a table.
dce_uploads.createmultipartupload: Discourse Package for Uploads operations that could not be mapped to a table.
Creates a multipart upload in the external storage provider, storing
a temporary reference to the external upload similar to /get-presigned-put.
You must have the correct permissions and CORS settings configured in your
external provider. We support AWS S3 as the default. See:
https://meta.discourse.org/t/-/210469#s3-multipart-direct-uploads-4.
An external file store must be set up and `enable_direct_s3_uploads` must
be set to true for this endpoint to function.Parameters of Procedure
The following parameters can be used to control the behaviour of the procedure `dce_uploads.createmultipartupload`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values.
Value specification by position is done by listing all values from the first to the last needed value. For example: a `begin package.procedure(value1, value2, value3); end` on a procedure with four parameters will use the default value for the fourth parameter and the specified values for the first three.
Value specification by name is done by listing all values that require a value. For example with `begin package.procedure(name1 => value1, name3 => value3); end` on the same procedure will use the default values for the second and fourth parameters and the specified values for the first and third.
| Name | Data Type | Required | Default Value | Documentation |
|---|:---:|:---:|:---:|---|
| `upload_type` | `string` | ☑ | | Values: avatar, profile_background, card_background, custom_emoji, composer. |
| `file_name` | `string` | ☑ | | |
| `file_size` | `int64` | ☑ | | File size should be represented in bytes. |
| `sha1_checksum` | `string` | ☐ | | The SHA1 checksum of the upload binary blob. Optionally
be provided and serves as an additional security check when
later processing the file in complete-external-upload endpoint. |