Skip to content

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/upload

Headers ​

HeaderRequiredDescription
x-nextinteract-authtokenYesAuth 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 ​

ExceptionDescription
WSInvalidParameterExceptionSee Error Definitions
WSUnsupportedVersionExceptionSee Error Definitions
WSInvalidAuthTokenExceptionSee Error Definitions
WSCacheServiceExceptionSee Error Definitions
WSFileUploadExceptionSee Error Definitions
WSMaxFileUploadSizeExceptionSee Error Definitions
WSFileUploadsLimitExceptionSee Error Definitions
WSInternalExceptionSee Error Definitions