I have uploaded a .png image from Azure bot using AttachmentPrompt and image is stored at http://localhost:52225/v3/attachments/7e46c370-2f09-11eb-8de3-8bfedba8e1e0/views/original. Image is not being stored as a .png, but without any extension. How to access this file ? I need to pass this file to OCR Read endpoint.
If you are about to call this API with the image that stored on your local side, you can just upload binary data of this image to OCR READ API with HTTP request header: Content-Type: application/octet-stream.
Just like below :
Let me know if you need more assistance.
Related
I want to generate a file (PDF, txt, csv, ...) in a parse cloud code function and send it directly as download to the browser without saving it on the server.
Is there a possibility to modify the cloud code response (headers, body)?
Or is there an other way to achieve this?
I'm reading the official doc for Amazon S3 Multipart Upload REST API, I'm wondering whether it's possible to use this API via AJAX.
The reason I'm asking is I try to upload a very large file (>5GB) from my browser to S3 bucket, I know there's a S3 upload API for Javascript and a way of leveraging AJAX to upload file to S3 but none of these address the large file issue.
The reason for not supporting MultiPart upload API using AJAX that I can think of is browser is not able to split the local file but I want to make sure it's really the case.
Does anyone around here ever used multipart upload api in AJAX or if it's impossible doing that, how do people usually deal with large file upload from browser?
Lots of thanks in advance!
I don't think it's necessary for you to use the Rest API for this. The s3.upload() method used in the javascript example you linked does support multipart uploads for large files according to the following AWS blog post: Announcing the Amazon S3 Managed Uploader in the AWS SDK for JavaScript. A browser example is included, although it uses bucket.upload rather than s3.upload. It also includes examples of tracking progress, configuring concurrency and part size and handling failures.
It does say with respect to browser uploads that "In order to support large file uploads in the browser, you must ensure that your CORS configuration exposes the ETag header; otherwise, your multipart uploads will not succeed. See the guide for more information on how to expose this header."
Possibly the CORS configuration may also need to allow more methods than listed in the 'Configuring CORS' section of the example you linked.
How can I have the user upload an image, then without sending it to a server give me the base64 version of the image?
I know in Amazon S3 we can upload images in base64 string format. Is there a functionality that we can download the image from amazon in base64 format rather than URL of the amazon.
Are you looking for GetObject?
I want to send my image to php web service. I convert image in bytcode and try to send it to web service but php web service want my image in file formate so please tell me how can I make my image in file formate and send it to php web service.
You need to perform a file upload with multipart data, see Upload files with HTTPWebrequest (multipart/form-data) for a example.