It's wrapper project designed to manage user's files.
Buckets mapping:
| Environment | Bucket Name |
|---|---|
| qa | staypuft-item-images |
| staging | neat-images-staging |
| production | neat-images-prod |
Supports following file artifact names:
invoice-logo
Resource:
GET /files/:name/uploadUrl
An AWS S3 presigned url scoped by account id will be returned.
Request URL parameters:
:name- The artifact name.mime-type- The MIME Type of the file that will be uploaded. Headers:Authorization: Bearer {jwt token}
Request Example:
curl -X GET -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5c...' 'https://storage.neat.com/files/invoice-logo/uploadUrl?mime-type=image/jpeg'Response example:
{
"uploadUrl": "https://neat-images-prod.s3.amazonaws.com/5fc571126678c20027017748/files/invoice-logo?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAQV64PZNHZPEHRBTA%2F20201130%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201130T222622Z&X-Amz-Expires=900&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Security-Token=IQoJb3JpZ2l..."
}Errors:
Unsupported artifact name
Resource:
GET /files/:name/downloadUrl
An AWS S3 presigned url to download the file.
Request URL parameters:
:name- The artifact name.will be uploaded.
Headers: Authorization: Bearer {jwt token}
Request Example:
curl -X GET -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5c...' 'https://storage.neat.com/files/invoice-logo/downloadUrl'Response example:
{
"downloadUrl": "https://neat-images-prod.s3.amazonaws.com/5fc571126678c20027017748/files/invoice-logo?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAQV64PZNHZPEHRBTA%2F20201130%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20201130T222622Z&X-Amz-Expires=900&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Security-Token=IQoJb3JpZ2l..."
}Errors:
Unsupported artifact name
Resource:
GET /files/:name/download
Redirect via HTTP Header Location to the presigned download url.
Request URL parameters:
:name- The artifact name.will be uploaded.
Headers: Authorization: Bearer {jwt token}
Request Example:
curl -X GET -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5c...' 'https://storage.neat.com/files/invoice-logo/download'