django-progressbarupload icon indicating copy to clipboard operation
django-progressbarupload copied to clipboard

Can't see progress bar

Open baltasvejas opened this issue 10 years ago • 2 comments

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.

baltasvejas avatar Feb 27 '15 19:02 baltasvejas

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

putyourlitterhere avatar Jun 08 '15 09:06 putyourlitterhere

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?

po-stas avatar Jan 24 '16 06:01 po-stas