POST ./foto/upload
It is used to upload a photo.
Mentions
The file can have a maximum size of 500mb
.
Type | Allowed extensions | | |
---|
photos | gif , png , jpg , jpeg , tiff , svg , heic , heif | | |
video | webm , avi , mov , wmv , mp4 , mpg , mpg2 , mpeg , m4v | | |
POST parameters
Name | Value Type | Validation | Details |
---|
fsTip | int | Required | File type. |
fsFile | file | Required | The file that will be uploaded. |
fsRootID | int | Optional | The root ID where the file will be uploaded. |
fsNume | string | Optional | Used to override the file name. May contain only the characters a-z0-9-_ |
Validation
Error Field | Error Code | Error Message |
---|
fsFile | 101 | File cannot be uploaded. |
fsRootID | 102 | Invalid fsRootID or access denied. |
Output example
{
"fsID": "7616",
"fsTip": "2",
"fsNume": "sdgsAdgsdgexe",
"fsExt": "png",
"fsSize": "1533.59",
"fsMimeType": "image/png",
"fsInsertDate": "2020-06-17 13:31:28",
"fsUrl": "http://127.0.0.1/f?fsID=7616&_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.WzEwMDE1LDEwNDEzMiwxLDE2MTQxNzExMjdd.yo5O9viggKD2a7ASKeR49s9iveSIwwiTfXXpn7VTjJ4",
"fsMeta": {
"fsThumb": {
"fsUrl": "http://oss-dev.adservio.net:9000/adservio-fsthumb/2/200617-06423f88-6daee38b12ac322f3d77560ded0746bf.png",
"fsWidth": 227,
"fsHeight": 300
},
"fsWidth": 697,
"fsHeight": 923
},
"fsDescriere": null,
"fspToken": null,
"fsShares": 0,
"fsShareCount": 0,
"fsComments": 0,
"fsOwner": {
"uaID": "104132",
"uaTip": "1",
"uaFirstName": "Claudiu",
"uaLastName": "Achiroaei",
"uaSex": "1",
"prefAvatar": null,
"clasa": {
"clID": "244",
"clNume": "XI C",
"ascIsActiv": "0",
"ascNume": "2015/2016"
}
}
}