Upload an image to metaweb by specifying a URL. This service was specifically designed to be used with the flipbook in the client and has restrictions as to what you can upload.
more
Upload an image to metaweb by specifying a URL. This service was specifically designed to be used with the flipbook in the client and has restrictions as to what you can upload.
- Only GIF, PNG, JPEG image formats are allowed.
- If the document argument is not provided a new one is created
- If content-type argument is not provided, the service looks for the HTTP Content-Type header to get the information
- If the content-type argument and the HTTP Content-Type header are both provided the form argument takes precedence
Sample request
var content = "uri=" + encodeURIComponent("http://foo.com/smile.jpg");
var uri = "http://api.freebase.com/api/service/uri_submit_image";
var result = acre.urlfetch(uri,"POST",{"content-type": "application/x-www-form-urlencoded"},content,true);
Sample response:
{
"status": "200 OK",
"code": "/api/status/ok",
"result": {
"length": $length$,
"blob_id": "115ccad525afbb09ed7b18ea06cacdbc60380ec03de69523ae01da5c371c72c8",
"language": "/lang/en",
"media_type": "image/jpeg",
"text_encoding": null,
"type": "/type/content",
"id": "/guid/4401a8c040003d1d8000000000027ef2"
}
}
less