Skip to main content
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://hostt:port]/fmedataupload/<repository>/<workspace>/<filename>

 

 

 

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
Thank you for the quick reply! Just what I was looking for.

Reply