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 β
The final routes are subject to change before Go-Live Summer 2024
The following applies to EARLY ACCESS prior to Go Live.
Some of our routes will be changing prior to our final go-live date this summer (2024). They won't change during Early Access, but be sure to check the documentation.
In order to make a smooth tranistion, we'll provide detailed information on which routes changed and which remained the same. As a good programming practice, you store the routes in a central library for easier migration.
Older routes may be kept active for short period of time to help with any transitions.
Payload β
In the payload
you will need to specify two fields.
Name | Description |
---|---|
file_name | The 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_type | post |
{
"file_name": "<file-name>",
"method_type": "post"
}
Response β
The response will contain a decent amount of information that you will need to carry along for the next steps.
Fields needed for the File Upload Process β
In the next section, we'll cover the process of uploading a file. You will need the following fields during that process.
Name | Description |
---|---|
url | The endpoint for the file upload |
fields | All the necessary fields you'll need to submit in the body of the payload (along with the file) |
Fields needed when submitting an Analysis for an Execution β
Later after the file is uploaded, you will want to run an execution. Part of the payload to start an execution is the file location in S3. You will need the bucket name
and object key
which can be found in this payload.
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 a
form` upload object for uploading