Coder Social home page Coder Social logo

django-s3upload's People

Contributors

yaniv-aknin 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

Watchers

 avatar  avatar  avatar  avatar  avatar

django-s3upload's Issues

Upload failed

Hi,

I have followed all the instructions that is given in the readme and found that the server is running fine but while i upload anything ,it says "failed" as the status. Im somehow feeling that something is missing as input.... can you please throw me some light on this !

im doubting that there is some discrepency in the values that are passed in the html :

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Upload Demo</title>
        <link rel="stylesheet" type="text/css" href="{% url static "index.css" %}">
        <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
        <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.9.0/jquery-ui.min.js"></script>
        <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/coffee-script/1.3.3/coffee-script.min.js"></script>
        <script type="text/javascript" src="{% url static "jquery.fileupload.js" %}"></script>
        <script type="text/coffeescript">
            log = (status) ->
                $("#status").html status
            $ ->
                $("#upload_button").click ->
                    $("input[type=file]").click()
                form = $("#upload_form")
                form.fileupload
                    dataType: "xml"
                    add: (event, data) ->
                        log "fetching params"
                        $.get("{% url params %}").done (params) ->
                            form.find('input[name=key]').val(params.key)
                            form.find('input[name=policy]').val(params.policy)
                            form.find('input[name=signature]').val(params.signature)
                            data.submit()
                    send: (event, data) ->
                        log "sending"
                    progress: (event, data) ->
                        $("#progress_bar").css "width", "#{Math.round((event.loaded / event.total) * 1000) / 10}%"
                    fail: (event, data) ->
                        log "failure"
                        console.log event, data
                    done: (event, data) ->
                        log "file uploaded to " + decodeURIComponent $(data.result).find("Location").text()
        </script>
    </head>
    <body>
        <h1>Upload Demo</h1>
        <div id="invisible">
            <form action="{{ settings.AWS_S3_BUCKET_URL }}" method="post" enctype="multipart/form-data" id="upload_form">
                <input type="hidden" name="key"></input>
                <input type="hidden" name="AWSAccessKeyId" value="{{ settings.AWS_ACCESS_KEY_ID }}"></input>
                <input type="hidden" name="acl" value="public-read"></input>
                <input type="hidden" name="policy"></input>
                <input type="hidden" name="signature"></input>
                <input type="hidden" name="success_action_status" value="201"></input>
                <input type="file" name="file"></input>
            </form>
        </div>
        <div id="wrapper">
            <img src="{% url static "upload_icon.png" %}" id="upload_button"/>
            <div id="progress_container">
                <div id="progress_bar"></div>
            </div>
        </div>
        <div id="status_container">Status: <span id="status">idle</span></div>
    </body>
</html>

Nice project!

I just wanted to say thank you for sharing :)

It gives me a direction how to start, however I need to have the files in the django database as well, so I have some more work to do :)

403 forbidden

Hi,
its a long time I know. But I am facing 403 error when trying to upload anything to s3.

Does anything in the project needs to be changed?

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.