Skip to main content
Question

Uploading file to a workspace with the REST-API

  • June 27, 2013
  • 2 replies
  • 35 views

sigtill
Supporter
Forum|alt.badge.img+25
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>

 

 

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

david_r
Celebrity
  • 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
Supporter
Forum|alt.badge.img+25
  • Author
  • Supporter
  • June 28, 2013
Thank you for the quick reply! Just what I was looking for.