Code Monkey home page Code Monkey logo

Comments (3)

sagidM avatar sagidM commented on June 21, 2024

@oleteacher,
Thank you question.

I just make post request to Amazon S3.
So, you need to allow files:
Choose your bucket, click to "Permissions" tab, in "Public access" you have what you need.

This photo may help
2017-08-25 09-41-14

You can use this simple form to upload any file

  <form action="http://[YOUR_BUCKET_NAME].s3.amazonaws.com" method="post" enctype="multipart/form-data">
  	<input type="text" name="key" value="my file's name here">
  	<input type="file" name="file">
  	<input type="submit" >
  </form>

Hope it helped


UPD
As far as I know, Amazon allow upload only one file in one request.
And key always must be before file


UPD

I almost forgot.
It's unsecure method because every person can upload their files and replace yours!
So you should pre-sign your request with special key. This key is created on server side (it also contains path to file).

Once, this link helped me
https://devcenter.heroku.com/articles/direct-to-s3-image-uploads-in-rails#pre-signed-post
Even if you don't use Heroku or Ruby on Rails, reading this article should help.

For other languages you can use search on Heroku.
And also see the official docs
http://docs.aws.amazon.com/AmazonS3/latest/dev/PresignedUrlUploadObject.html

from smartuploader.

oleteacher avatar oleteacher commented on June 21, 2024

Thank you much for reply and input @kofon95

I was under impression that your script was setup to use amazon key & secret. I will explore to see if can use as is.

Thank you again.

from smartuploader.

sagidM avatar sagidM commented on June 21, 2024

You're very welcome

from smartuploader.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.