POST ./fisiere/upload
It is used to upload a file.
Observations:
For Library module, you should send X-Tenant-ID in header, with the root organization.
Eg. for Adservio organization use X-Tenant-ID = 260.
This option allow uploading files in one place, for all child organizations.
Mentions
The file can have a maximum size of 500mb.
| Type | Allowed extensions | ||
|---|---|---|---|
| archives | 7z, arj, rar, gz, z, zip, tar | ||
| documents | doc, docx, odt, xls, xlsx, ods, csv, pdf, ppt, pptx, pps, odp, key, txt, rtf, accdb, adp | ||
| images | gif, png, jpg, jpeg, tiff, svg, heic, heif | ||
| audio | aif, cda, mid, midi, mp3, mpa, ogg, wav, wma | ||
| video | webm, mkv, avi, mov, wmv, mp4, mpg, mpg2, mpeg, m4v | ||
| miscellaneous | cpp, c, psd, cdr |
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-_ |
| fsDescriere | string | Optional | File description |
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"}}}
