django-progressbarupload
django-progressbarupload copied to clipboard
{% progress_bar %} doesn't display progress.
I'm building a small app that stores whalesong. I've got my forms uploading to an S3 via boto3 and django-storages. I've also installed the development version of django-progressbarupload and am running django 2.0.6
The progress bar element appears and is styled, but doesn't animate nor sync with the file upload. The files are going to an s3 via a spotty connection, and the transfer usually takes 10-15 seconds. I've attached a video of an upload in action.
base template header
<head>
{% load progress_bar %}
{% block title %}<title>Whale Song and other Cetacean Communication</title>{% endblock %}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'css/app.css' %}">
<script type="text/javascript" src="{% static 'js/amplitude.min.js' %}"></script>
<script src="{% static "js/jquery-3.3.1.min.js" %}"></script>
{% progress_bar_media %}
</head>
form template snip
{% extends "base_generic.html" %}
{% load progress_bar %}
{% block content %}
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.non_field_errors }}
<div>
<label for="{{ form.file.id_for_label }}">File</label>
{{ form.file.errors }}
{{ form.file }}
{% progress_bar %}
</div>
Project Here: https://github.com/kidconcept/whalejams
Video Here https://tinytake.s3.amazonaws.com/pulse/elpulpo/attachments/8400940/TinyTake29-07-2018-11-47-06.mp4
The progress_bar.js is returning 100.23% every step of its update_progress_info. The getJSON contained within doesn't seem to have access to the current file upload. I'm not sure how this part works, it calls the upload_progress_url which is 'progressbarupload/upload_progress' but i've no idea how that url returns (or in this case doesn't) the file upload progress
@kidconcept are you testing the upload from the computer that is running the server? I ran into the same thing but it was because the upload was virtually instant while the processing wasn't.