Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't see progress bar #13

Open
baltasvejas opened this issue Feb 27, 2015 · 2 comments
Open

Can't see progress bar #13

baltasvejas opened this issue Feb 27, 2015 · 2 comments

Comments

@baltasvejas
Copy link

On Django 1.7 with django-progressbarupload master version.
My form template is:

{% load progress_bar %}
<form action="/upload/" method="POST" enctype="multipart/form-data">
    {% csrf_token %}
    {% for field in upload_form %}
    <div class="row">
        {{ field.errors }}
        {{ field.label_tag }} {{ field }}
    </div>
    {% endfor %}
    {% progress_bar %}
    <input type="submit" value="Upload" />
</form>

HTML output I get:

<form action="/upload/" method="POST" enctype="multipart/form-data">
  <input type="hidden" name="csrfmiddlewaretoken" value="BmnjVvlrAfSk9Yeua9wyjmZ6RykSnLsb">
  <div class="row">
    <label for="id_imagefile">Select a file:</label> <input id="id_imagefile" name="imagefile" type="file">
  </div>
  <progress id="progressBar" data-progress_bar_uuid="72de7380-a4ea-447d-b6ee-7a7dbf4941f3" style="width:100%" value="0" max="100" hidden=""></progress>
  <script>upload_progress_url = "/progressbarupload/upload_progress"</script>
  <input type="submit" value="Upload">
</form>

Although file is beeing uploaded, but I can't see the progress bar.

@putyourlitterhere
Copy link

I had the same problem. As kind of a workaround I added a sleep for some milliseconds.
It seems like my development environment otherwise is acting to fast. I described it in more detail on stackoverflow http://stackoverflow.com/questions/30583969/django-modelform-progressbar-for-file-upload

@po-stas
Copy link

po-stas commented Jan 24, 2016

Have the similar problem. While debugging the application i found that progressbar is added to a final page but is not visible. The uploadhandler trying to find it's id to update the progress searching for 'X-Progress-ID' key in request but there is no such key added to request. I cannot see this key in html output of my template also. Actually i cannot figure out what id is meant - or some else id? And how to make it appear in META of the request to make the handler be able to update the progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants