I have a web-service which accepts image data.Anyone guide me how do I sent image file which I have captured from my phone to the services on a button click?. I searched the smartface docs and also the website I got an idea of uploading to a Web-client but didn't find anything of how to upload data to SOAP services.
Thanks.
I don't know what kind of data does your webservice except.
If you are using capture function of camare, you will be able to reach the path of photo.
http://www.smartface.io/developer/guides/device/camera-usage-2/#capture
Also, you can save the captured photo, and use it by the name you gived.
http://www.smartface.io/developer/guides/device/camera-usage-2/#save
If these documents don't help, can you share the url of service in order for me to check it?
Related
I have an application built with react.js, node.js, PostgreSQL. I want to host a bunch of images somewhere and store their links in my database. To frontend will retrieve these images and display them.
I tried Icedrive eg:hosted image and google photos but the link which they provide has some interface and cannot be directly displayed in a tag.
What free service I can use?
One can use Imgur. As they provide a direct link option that can be used in a tag.
As per the documentation, if I wish to upload only media without any metadata, the simple upload will do. And the documentation says:
So, as per the documentation, I formed the request as follows and the body of the request is binary data:
But I am not able to figure out where to set the parent directory information for the media being uploaded if the body is comprised of only media.
Do I need to submit two requests, one for metadata and one for media? For that, we are provided with the multipart upload.
Can anyone please help me with a working example of a simple upload?
The form-data section in this Postman docs page might help you with entering the file location.
I found a YouTube video on the subject too.
After uploading an image, I get back metadata that has a mediaDownloadLink that will download the file when accessed. Is there a way to get a link that will display the image in the browser without downloading it?
In general, any object you set to be publicly accessible (which presumably you wanted to do to use it to host images on a website), you can then access with https://storage.googleapis.com/<bucket>/<object>. You can see this link also if you go to the cloud console and make an object publicly viewable and look for the Public link you can click.
If you have problems with the link downloading instead of displaying by itself in a browser, you may need to make sure the content-type header is set correctly; for example if using ByteArrayContent to upload data using the Java API, you'll want to set a string like "image/jpeg" in its constructor for "type".
I'm using the sample code provided in the REST API docs for uploading an image (my own) and then assigning it to an object in an image table. Image uploads fine, code for associating the image runs fine, and a record is created in the DB.
However, if I try to access the image from the data browser, I get ACCESS DENIED. Why is this so? The image is retrievable via the URL provided after a successful upload, but doesn't appear anywhere in the Parse web UI (should it be ihe Files section of Cloud Code?).
Any input would be helpful. I am working on a few wrinkles to get it working.
The answer to this question is to use the long filename provided in the image upload confirm, and not the short filename example shown in the docs.
I'm attempting to set up an app for a small set of known users, all of whom have a sub "page", "account" or whatever the terminology du jour is. The main goal of the app is to publish photos to these sub-accounts in an automated fashion on their behalf.
The crux of the issue seems to be that while I can ask for "manage_pages" to manage the user's sub-accounts and for "publish_stream" which allows me to upload photos to the user's root stream I can't upload photos to a subaccount stream.
I've been able to do a status update on the sub-account stream (text only), but every time I try to upload a photo (via curl, commandline-style), I get various errors depending on how I try to do it:
http://graph.facebook.com/albumid/photos -> Error #324 requires upload file
http://graph.facebook.com/albumid -> Error #200 application does not have the capability to make this API call.
http://graph.facebook.com/subaccount_id/feed - > Error #100 Source URL is not properly formatted
http://graph.facebook.com/subaccount_id/photos -> Error #324 requires upload file
I've stabbed around in the dark like this for about 4 hours with no luck and am beginning to wonder: Is posting a photo to a user's sub-account stream even possible? If so, how?
(BTW, I have tried doing a text status update with a photo URL -- attempting to circumvent the whole uploading part -- and that doesn't help. The url of the photo appears in the post, but does not show the photo. I'm open to any suggestion that shows photos in a subaccount stream.)
Only about 5 minutes after posting this, I kind of, sort of found a solution:
First, upload the image to your own web server, s3 bucket, or other location.
Second, use http://graph.facebook.com/subaccount_id/feed with source=http://www.thenewlocationofyourimage.com/image.jpg.
The image shows up in the page stream, albeit as a small thumbnail. Better than nothing, though. If you have better information, PLEASE let me know. Thanks!