Constructor
# private new BaseProvider(bucket)
Parameters:
Name | Type | Description |
---|---|---|
bucket |
string
|
place where files should be stored |
Classes
Members
# bucket
Bucket is a place where files should be stored. Usually it is a folder location
# name
Name is used to verify if the object passed by UploadOptions#provider is
this type. We cannot check typeof because there could be a different versions of npm package installed in a project.
string
# name
Name is used to verify if the object passed by UploadOptions#provider is
this type. We cannot check typeof because there could be a different versions of npm package installed in a project.
Methods
# async abstract delete(key, bucket, context) → {Promise.<any>}
Deletes given file
Parameters:
Name | Type | Description |
---|---|---|
key |
string
|
file path |
bucket |
string
|
where file should be uploaded |
context |
ActionContext
|
Promise.<any>
# async abstract path(key, bucket, context) → {Promise.<string>|string}
Returns path for the file from where it can be downloaded. It is dynamic in case of
time based paths: i.e. link valid in the next 24h
Parameters:
Name | Type | Description |
---|---|---|
key |
string
|
file path |
bucket |
string
|
where file should be put |
context |
ActionContext
|
Promise.<string>
|
string
# async abstract upload(file, key, context) → {Promise.<any>}
Uploads file to given bucket
Parameters:
Name | Type | Description |
---|---|---|
file |
UploadedFile
|
uploaded by AdminJS file |
key |
string
|
file path |
context |
ActionContext
|
Promise.<any>