mirror of
https://github.com/strapi/strapi.git
synced 2025-11-10 15:19:00 +00:00
add documentation
This commit is contained in:
parent
2ede104be5
commit
ae807faacc
@ -13,6 +13,7 @@ The plugin exposes a single route `POST /upload` to upload one or multiple files
|
|||||||
**Parameters**
|
**Parameters**
|
||||||
|
|
||||||
- `files`: The file(s) to upload. The value(s) can be a Buffer or Stream.
|
- `files`: The file(s) to upload. The value(s) can be a Buffer or Stream.
|
||||||
|
- `path`: (optional): The folder where the file(s) will be uploaded to (only supported on strapi-upload-aws-s3 now).
|
||||||
- `refId`: (optional): The ID of the entry which the file(s) will be linked to.
|
- `refId`: (optional): The ID of the entry which the file(s) will be linked to.
|
||||||
- `ref`: (optional): The name of the model which the file(s) will be linked to (see more below).
|
- `ref`: (optional): The name of the model which the file(s) will be linked to (see more below).
|
||||||
- `source`: (optional): The name of the plugin where the model is located.
|
- `source`: (optional): The name of the plugin where the model is located.
|
||||||
@ -111,6 +112,7 @@ Let's say that you want to have a `User` model provided by the plugin `Users & P
|
|||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
"files": "...", // Buffer or stream of file(s)
|
"files": "...", // Buffer or stream of file(s)
|
||||||
|
"path": "user/avatar", // Uploading folder of file(s).
|
||||||
"refId": "5a993616b8e66660e8baf45c", // User's Id.
|
"refId": "5a993616b8e66660e8baf45c", // User's Id.
|
||||||
"ref": "user", // Model name.
|
"ref": "user", // Model name.
|
||||||
"source": "users-permissions", // Plugin name.
|
"source": "users-permissions", // Plugin name.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user