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.

TypeAllowed extensions
archives7z, arj, rar, gz, z, zip, tar
documentsdoc, docx, odt, xls, xlsx, ods, csv, pdf, ppt, pptx, pps, odp, key, txt, rtf, accdb, adp
imagesgif, png, jpg, jpeg, tiff, svg, heic, heif
audioaif, cda, mid, midi, mp3, mpa, ogg, wav, wma
videowebm, mkv, avi, mov, wmv, mp4, mpg, mpg2, mpeg, m4v
miscellaneouscpp, c, psd, cdr

POST parameters

NameValue TypeValidationDetails
fsTipintRequiredFile type.
fsFilefileRequiredThe file that will be uploaded.
fsRootIDintOptionalThe root ID where the file will be uploaded.
fsNumestringOptionalUsed to override the file name. May contain only the characters a-z0-9-_
fsDescrierestringOptionalFile description

Validation

Error FieldError CodeError Message
fsFile101File cannot be uploaded.
fsRootID102Invalid 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"
}
}
}