Skip to content

Presigned Upload Request โ€‹

To upload a file into the Aplos NCA SaaS system, you will need to create a request for an AWS Presigned URL, which will allow you to upload the file. You will use the response information to upload your file.

Route โ€‹

See File System in the API routes reference (the upload-URL request).

Payload โ€‹

In the payload you will need to specify two fields.

NameDescription
file_nameThe name of the file. Whatever you enter here will be name of the file stored in our system. Typically you will name this the same as the actual file name, but you have an opportunity to override it here.
method_typepost
json
{
    
    "file_name": "<file-name>",
    "method_type": "post"
}

Response โ€‹

The response is wrapped in the standard success envelope. The data object contains everything you need for the next steps.

Note

You can send request fields in camelCase or snake_case โ€” the API accepts either and normalizes to snake_case internally. Responses come back in camelCase to match the web app.

Fields needed for the File Upload Process โ€‹

In the next section, we'll cover the process of uploading the file. You will use the following fields from data during that process.

NameDescription
urlThe S3 endpoint to POST the file to.
fieldsThe S3 POST-policy form fields to include in the upload body (along with the file).

Fields needed when submitting an Analysis for an Execution โ€‹

Later, when you run an execution, you reference the uploaded file by its fileId โ€” returned as data.fileId in this response. Hold onto it.

Example with ๐Ÿ Python โ€‹

This code sample wraps up the process of requesting the pre-signed URL and doing the upload.

For this section, we'll focus on def __get_presigned_upload_info(self, input_file: str) -> S3PresignedPayload:, which generates the request.

The result of the request is then handed off to another python modulewhich processes the resulting payload and creates aform` upload object for uploading