Code Monkey home page Code Monkey logo

elm-s3's People

Contributors

toastal avatar zoul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

elm-s3's Issues

Uploading without an explicit prefix creates an “invisible” top-level folder

When I don’t set an explicit prefix using S3.withPrefix (or start the prefix with a slash), a “invisible” no-name top-level folder is created in the bucket. I think the problem is in the uploadFileTask function, assembling the key:

 key =
    interpolate "{0}/{1}"
        [ record.prefix
        , fileData.fileName
        ]

This makes total sense – except it seems that somewhere along the way another slash gets prepended to the key. This means that with an empty prefix, the key gets set to "/filename" and later to "//filename", which S3 happily inflates into a no-name folder as can be seen in the S3 Management Console. (Same thing happens if there is a prefix, but starts with a slash.)

Support buckets with dots in names

Currently the upload URL is constructed from the bucket name and the AWS host:

url =
    interpolate """https://{0}.{1}"""
        [ record.bucket
        , record.awsS3Host
        ]

This doesn’t work for buckets that have dots (.) in their names. According to this it should be possible to use an alternate URL format to upload:

https://s3-{region-name}.amazonaws.com/{bucket-name}

This has the advantage of working even for buckets with dots. Could we switch to this URL format?

Expose plain HTTP request

As noted in the Discourse thread, due to Elm's Task limitation, you cannot get the tracker from a Task. Because I want to upload videos, and videos can be quite large, I want the ability to see the progress and cancel.

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.