Skip to main content
Question

Uploading file to a workspace with the REST-API


sigtill
Contributor
Forum|alt.badge.img+24
Is there any demo available uploading file to a workspace with the REST-API and not the HTTP PUT method as described in the documentation:

 

http://host[:port]/fmedataupload/<repository>/<workspace>/<filename>

 

 

 

Did this help you find an answer to your question?

2 replies

david_r
Evangelist
  • June 27, 2013
Heisann,

 

 

You cannot easily send a filename by http, since the request is handled by the remote server which normally has no notion or access to your local file system.

 

 

Further, you cannot send the contents of the file encoded in the URL (except for very small files) as a URL has a maximum length of about 2000 characters. Also, URL-encoding binary data makes the data volume transmitted explode.

 

 

That is why the POST/PUT methods exist, where you send the file contents in the message body, where there is no size limit, rather than in the request URL.

 

 

So unless you get really creative, I suspect it will not be feasible to upload your files this way.

 

 

David

sigtill
Contributor
Forum|alt.badge.img+24
  • Author
  • Contributor
  • June 28, 2013
Thank you for the quick reply! Just what I was looking for.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings