2018-09-18 20:39:31 +02:00
|
|
|
{
|
|
|
|
"paths": {
|
2023-03-15 13:25:17 +01:00
|
|
|
"/upload": {
|
2018-09-20 11:40:37 +02:00
|
|
|
"post": {
|
2023-03-15 13:25:17 +01:00
|
|
|
"description": "Upload files",
|
2018-09-20 11:40:37 +02:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "response",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
2023-03-15 13:25:17 +01:00
|
|
|
"$ref": "#/components/schemas/UploadFile"
|
2018-09-20 11:40:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "",
|
|
|
|
"tags": [
|
|
|
|
"Upload - File"
|
|
|
|
],
|
|
|
|
"requestBody": {
|
2023-03-15 13:25:17 +01:00
|
|
|
"description": "Upload files",
|
2018-09-20 11:40:37 +02:00
|
|
|
"required": true,
|
|
|
|
"content": {
|
|
|
|
"multipart/form-data": {
|
|
|
|
"schema": {
|
2023-03-15 13:25:17 +01:00
|
|
|
"required": [
|
|
|
|
"files"
|
|
|
|
],
|
|
|
|
"type": "object",
|
2018-09-20 11:40:37 +02:00
|
|
|
"properties": {
|
|
|
|
"path": {
|
|
|
|
"type": "string",
|
2023-03-15 13:25:17 +01:00
|
|
|
"description": "The folder where the file(s) will be uploaded to (only supported on strapi-provider-upload-aws-s3)."
|
2018-09-20 11:40:37 +02:00
|
|
|
},
|
|
|
|
"refId": {
|
|
|
|
"type": "string",
|
2023-03-15 13:25:17 +01:00
|
|
|
"description": "The ID of the entry which the file(s) will be linked to"
|
2018-09-20 11:40:37 +02:00
|
|
|
},
|
|
|
|
"ref": {
|
|
|
|
"type": "string",
|
2023-03-15 13:25:17 +01:00
|
|
|
"description": "The unique ID (uid) of the model which the file(s) will be linked to (api::restaurant.restaurant)."
|
2018-09-20 11:40:37 +02:00
|
|
|
},
|
|
|
|
"field": {
|
|
|
|
"type": "string",
|
2023-03-15 13:25:17 +01:00
|
|
|
"description": "The field of the entry which the file(s) will be precisely linked to."
|
|
|
|
},
|
|
|
|
"files": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "string",
|
|
|
|
"format": "binary"
|
|
|
|
}
|
2018-09-20 11:40:37 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2023-03-15 13:25:17 +01:00
|
|
|
"/upload?id={id}": {
|
|
|
|
"post": {
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"name": "id",
|
|
|
|
"in": "query",
|
|
|
|
"description": "File id",
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
2018-09-18 20:39:31 +02:00
|
|
|
}
|
|
|
|
}
|
2023-03-15 13:25:17 +01:00
|
|
|
],
|
|
|
|
"description": "Upload file information",
|
2018-09-18 20:39:31 +02:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
2023-03-15 13:25:17 +01:00
|
|
|
"description": "response",
|
2018-09-18 20:39:31 +02:00
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/components/schemas/UploadFile"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-03-15 13:25:17 +01:00
|
|
|
},
|
|
|
|
"summary": "",
|
|
|
|
"tags": [
|
|
|
|
"Upload - File"
|
|
|
|
],
|
|
|
|
"requestBody": {
|
|
|
|
"description": "Upload files",
|
|
|
|
"required": true,
|
|
|
|
"content": {
|
|
|
|
"multipart/form-data": {
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"fileInfo": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"alternativeText": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"caption": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"files": {
|
|
|
|
"type": "string",
|
|
|
|
"format": "binary"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-09-18 20:39:31 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2023-03-15 13:25:17 +01:00
|
|
|
"/upload/files": {
|
2018-09-18 20:39:31 +02:00
|
|
|
"get": {
|
2023-03-15 13:25:17 +01:00
|
|
|
"tags": [
|
|
|
|
"Upload - File"
|
2018-09-18 20:39:31 +02:00
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
2023-03-15 13:25:17 +01:00
|
|
|
"description": "Get a list of files",
|
2018-09-18 20:39:31 +02:00
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"$ref": "#/components/schemas/UploadFile"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2023-03-15 13:25:17 +01:00
|
|
|
"/upload/files/{id}": {
|
2018-09-18 20:39:31 +02:00
|
|
|
"get": {
|
|
|
|
"parameters": [
|
|
|
|
{
|
2023-03-15 13:25:17 +01:00
|
|
|
"name": "id",
|
2018-09-18 20:39:31 +02:00
|
|
|
"in": "path",
|
|
|
|
"description": "",
|
|
|
|
"deprecated": false,
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2023-03-15 13:25:17 +01:00
|
|
|
"tags": [
|
|
|
|
"Upload - File"
|
|
|
|
],
|
2018-09-18 20:39:31 +02:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
2023-03-15 13:25:17 +01:00
|
|
|
"description": "Get a specific file",
|
2018-09-18 20:39:31 +02:00
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/components/schemas/UploadFile"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"delete": {
|
|
|
|
"parameters": [
|
|
|
|
{
|
2023-03-15 13:25:17 +01:00
|
|
|
"name": "id",
|
2018-09-18 20:39:31 +02:00
|
|
|
"in": "path",
|
|
|
|
"description": "",
|
|
|
|
"deprecated": false,
|
|
|
|
"required": true,
|
|
|
|
"schema": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2023-03-15 13:25:17 +01:00
|
|
|
"tags": [
|
|
|
|
"Upload - File"
|
|
|
|
],
|
2018-09-18 20:39:31 +02:00
|
|
|
"responses": {
|
|
|
|
"200": {
|
2023-03-15 13:25:17 +01:00
|
|
|
"description": "Delete a file",
|
|
|
|
"content": {
|
|
|
|
"application/json": {
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/components/schemas/UploadFile"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-09-18 20:39:31 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"components": {
|
|
|
|
"schemas": {
|
|
|
|
"UploadFile": {
|
|
|
|
"properties": {
|
2023-03-15 13:25:17 +01:00
|
|
|
"id": {
|
|
|
|
"type": "number"
|
|
|
|
},
|
2018-09-18 20:39:31 +02:00
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2023-03-15 13:25:17 +01:00
|
|
|
"alternativeText": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"caption": {
|
2018-09-18 20:39:31 +02:00
|
|
|
"type": "string"
|
|
|
|
},
|
2023-03-15 13:25:17 +01:00
|
|
|
"width": {
|
|
|
|
"type": "number",
|
|
|
|
"format": "integer"
|
|
|
|
},
|
|
|
|
"height": {
|
|
|
|
"type": "number",
|
|
|
|
"format": "integer"
|
|
|
|
},
|
|
|
|
"formats": {
|
|
|
|
"type": "number"
|
|
|
|
},
|
2018-09-18 20:39:31 +02:00
|
|
|
"hash": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"ext": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"mime": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2023-03-15 13:25:17 +01:00
|
|
|
"size": {
|
|
|
|
"type": "number",
|
|
|
|
"format": "double"
|
|
|
|
},
|
2018-09-18 20:39:31 +02:00
|
|
|
"url": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2023-03-15 13:25:17 +01:00
|
|
|
"previewUrl": {
|
2018-09-18 20:39:31 +02:00
|
|
|
"type": "string"
|
|
|
|
},
|
2023-03-15 13:25:17 +01:00
|
|
|
"provider": {
|
2018-09-18 20:39:31 +02:00
|
|
|
"type": "string"
|
|
|
|
},
|
2023-03-15 13:25:17 +01:00
|
|
|
"provider_metadata": {
|
|
|
|
"type": "object"
|
|
|
|
},
|
2018-09-18 20:39:31 +02:00
|
|
|
"createdAt": {
|
2023-03-15 13:25:17 +01:00
|
|
|
"type": "string",
|
|
|
|
"format": "date-time"
|
2018-09-18 20:39:31 +02:00
|
|
|
},
|
2023-03-15 13:25:17 +01:00
|
|
|
"updatedAt": {
|
|
|
|
"type": "string",
|
|
|
|
"format": "date-time"
|
2018-09-18 20:39:31 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-03-24 16:39:19 +01:00
|
|
|
}
|