# dce_uploads.completeexternalupload: Discourse Package for Uploads operations that could not be mapped to a table. dce_uploads.completeexternalupload: Discourse Package for Uploads operations that could not be mapped to a table. Completes an external upload initialized with /get-presigned-put. The file will be moved from its temporary location in external storage to a final destination in the S3 bucket. An Upload record will also be created in the database in most cases. If a sha1-checksum was provided in the initial request it will also be compared with the uploaded file in storage to make sure the same file was uploaded. The file size will be compared for the same reason. 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.completeexternalupload`. 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 | |---|:---:|:---:|:---:|---| | `unique_identifier` | `string` | ☑ | | The unique identifier returned in the original /generate-presigned-put request. | | `for_private_message` | `string` | ☐ | | Optionally set this to true if the upload is for a private message. | | `for_site_setting` | `string` | ☐ | | Optionally set this to true if the upload is for a site setting. | | `pasted` | `string` | ☐ | | Optionally set this to true if the upload was pasted into the upload area. This will convert PNG files to JPEG. |