abstra-docs
Search…
Storage
With this connector, you can upload, list and download files from your Storage Provider.
Currently we only support AWS S3
To configure it, simply select the provider and fill the credentials of your provider:

AWS S3

  • Bucket
  • AWS region
  • Access Key Id
  • Secret Access Key
In order for our connector to work you need to configure your S3 Bucket CORS as follows:
1
[
2
{
3
"AllowedHeaders": [
4
"*"
5
],
6
"AllowedMethods": [
7
"PUT",
8
"GET"
9
],
10
"AllowedOrigins": [
11
"*"
12
],
13
"ExposeHeaders": []
14
}
15
]
Copied!
This CORS setting enables uploading and downloading files from your bucket.
There are 2 available methods: Upload and List

Upload

You can specify the type and amount of the uploaded files. Also a prefix to to prepend to the file name to create or use folders.

Adding parameters to the prefix

You can add params to your prefix by adding : in front of named keywords. When you use this method in the frontend, you can can dinamically fill the parameters:
1
rootFolder/:nestedFolder
Copied!
1
:rootFolder/:nestedFolder/subFolder
Copied!
Abstra also adds an unique hash before the file name to differentiate between files with identical name and fixes it to be URL friendly, so if you upload a picture called awesome cat.png its actual uploaded name will be something like 9217e761-957d-43d9-9d5d-5f27b6ac805c-awesome-cat-png
After the file/files are uploaded the connector response will be the following:
For a single file the response will be:
1
{
2
url: [URL OF THE OBJECT],
3
filename: [NAME OF THE UPLOADED OBJECT]
4
}
Copied!
For multiple file the response will be a list of the response of a single file

List

This method lists files from your Storage provider. You can filter files by a prefix.

Adding parameters to the prefix

You can add params to your prefix by adding : in front of named keywords. When you use this method in the frontend, you can can dinamically fill the parameters:
1
rootFolder/:nestedFolder
Copied!
1
:rootFolder/:nestedFolder/subFolder
Copied!
AThe result will be an array of:
1
{
2
Key: [KEY OF THE OBJECT],
3
LastModified: [LAST MODIFIED DATE],
4
Size: [SIZE OF THE OBJECT],
5
url: [URL OF THE OBJECT]
6
}
Copied!
Last modified 1mo ago
Copy link
Contents
Upload
List