Table of Contents

Put files



Parameter Description
itemId element id
storageType storage type:
1 - public(all users may see/download
files ),
2 - protected (that users may see/down-
load files who being grant rights)
path relative path from root folder to the file
writeType write type:
0 - overwrite a file,
1 - append to a file content,
2 - do not overwrite if file exists
eventHash event name which will be generated af-
ter processing the data

:!: There is no way for 'file' and 'folder' to coexist with the same names (e.g. text file 'readme' and 'readme'-folder) because Linux treats them as the same entity though with different attributes.

In order to upload some files, put them using POST-request with some params (multipart/form-data), e.g.:

Request URL:<sid>
Request Method: POST
Connection: keep-alive
Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryMpLUirMexsfCGaJP
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.3
Accept-Encoding: gzip,deflate,sdch
Accept-Language: ru,en-US;q=0.8,en;q=0.6

Content-Disposition: form-data; name="params"

Content-Disposition: form-data; name="eventHash"

Content-Disposition: form-data; name="f"; filename="one-file"
Content-Type: application/octet-stream



	"<filename>":"<result>",	/* <filename> - uploaded file name */
					/* <result> - request result; 0 - failed, 1 - OK */
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon   |   Copyright © 2002-2021 Gurtam