Upload file to server - nokia-wroclaw/innovativeproject-meetingdataexchange GitHub Wiki
URL:
{serverAddress}/api/upload/$login/$sid/$meetingid/$filename
Method:
PUT
Content-type:
Mutlipart/form-data
Method for web application:
public static ObjectNode web_upload(String login, String sid, String meetingid, File file, String filename) throws DataAccessException, Exception in controllers.FilesManagement
File class is from java.io package.
Description:
Upload a file to selected meeting. Filename must be unique at one meeting.
Input:
RAW file
Output OK:
{
"status": "ok"
}
Output error:
{
"status": "failed",
"reason": "reason of error"
}
Types of reasons:
Incorrect loginincorrect sid- blank valueIncorrect meetingidIncorrect file nameNot a member of meetingUpload forbiddenFile with this name already exists