Appearance
uploadSmartFile ​
Uploads a file to a given SAM server and returns unique file reference names to be used in subsequent calls to createSmartEntry(), updateSmartEntry(), or deleteSmartEntry() etc
IMPORTANT NOTE: Currently (17-OCT-17) for all uploading and create/edit entries activities, the client needs to pass Cookies AWSELB and JSESSIONID in the request headers so that the load balancer directs you to the same server which files were uploaded to.
Request ​
http
POST /rest/smartlib/uploadHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
Parameters ​
Multi Part Form Data - containing one or more files prefixed by param name smartFile such as smartFile1, smartFile2, smartFile3 etc. The real file names are handled by SAM and returned in the response with a unique timestamp added to avoid file name collisions on the server.
TODO - Aaron to add full request of small file(s) showing SINGLE and MULTI uploads.
Response ​
200 OK ​
Returns a list of SmartFileUploadResponseJSON objects in format:
json
[
{
"originalFilename": "event_image_1.jpg",
"tempFilename": "1495448149704-event_image_1.jpg"
},
{
"originalFilename": "event_image_2.jpg",
"tempFilename": "1495448149727-event_image_2.jpg"
}
]Errors ​
| Exception | Description |
|---|---|
WSInvalidParameterException | See Error Definitions |
WSUnsupportedVersionException | See Error Definitions |
WSInvalidAuthTokenException | See Error Definitions |
WSCacheServiceException | See Error Definitions |
WSFileUploadException | See Error Definitions |
WSMaxFileUploadSizeException | See Error Definitions |
WSFileUploadsLimitException | See Error Definitions |
WSInternalException | See Error Definitions |