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 login
incorrect sid
- blank valueIncorrect meetingid
Incorrect file name
Not a member of meeting
Upload forbidden
File with this name already exists