1

I have asp.net application and i want to upload image by url like

http://www.planwallpaper.com/static/images/images-7_kACPBns.jpg

to amazon bucket. How can i upload it directly without download it to my server and upload to amazon.

Note: I need it to reduce the memory without save the image in memory and then upload the image to amazon.

1 Answer 1

3

You can let your clients directly upload files to S3 bucket using pre-signed URLs. There's a nice article here that shows the process on a working example:

Browser Uploads to S3 using HTML POST Forms

Basically you sign the URL and your client uploads the file to AWS using that URL. So the file doesn't reach your server. Check out this to see the diagram of the workflow:

Browser-Based Uploads Using POST (AWS Signature Version 2)

and for the Version 4 of AWS signature:

Authenticating Requests in Browser-Based Uploads Using POST (AWS Signature Version 4)

Sign up to request clarification or add additional context in comments.

7 Comments

Thanks for Answer,but i need it by aws sdk for .net.
I need it for Console Application.
@Abd: How do you plan to make it work with a console application? The client comes to your site, you return a signed URL and other necessary information and they upload the file to S3. Anyway, if you post your current code and show where you are stuck I can help
The idea from my application : in Console application i start to enter url by "string url = Console.Read();" for example i entered the image url "planwallpaper.com/static/images/images-7_kACPBns.jpg" then i need to upload this image to my amazon bucket without save the image to memory stream and then upload it to amazon.
the aim of this is reduce the memory.This console application for me not for clients.to optimize downloading to my bucket.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.