Giter Club home page Giter Club logo

presigned-s3-upload's People

Contributors

nxtra avatar zaccharles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

presigned-s3-upload's Issues

running into CORS or Access-Control-Allow-Origin issues

@zaccharles

on OSX, if I open frontend/client.html directly I get:
Origin null is not allowed by Access-Control-Allow-Origin.
so i tried:

python3 -m http.server 7025

then navigate to http://localhost:7024/client.html
and put https://flimxcxxxx.execute-api.us-east-1.amazonaws.com/dev/ in the Step 1 - Enter API URL input box, where i guess the url from the output of serverless deploy :

endpoints:
  GET - https://flimxcxxxx.execute-api.us-east-1.amazonaws.com/dev/signed-url
  GET - https://flimxcxxxx.execute-api.us-east-1.amazonaws.com/dev/signed-post

but then after selecting a file and clicking upload it fails:

Failed to load resource: Origin http://localhost:7025 is not allowed by Access-Control-Allow-Origin.
client.html:62

note

Signer has no permissions to objects in the bucket

The permissions of the signer determine the permissions of the user of the signed Url.
Because of that no new objects can be uploaded via the signed Url.

This results in a 403 Forbidden AccessDenied response.
image

Proposal
I suggest to give the signer (lambda's) access to the objects in the bucket.
This will make sure that new objects can be uploaded via the signed url.

This are the proposed changes: #1

What do you think?

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.