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

{% progress_bar %} doesn't display progress. #27

Open
kidconcept opened this issue Jul 29, 2018 · 2 comments
Open

{% progress_bar %} doesn't display progress. #27

kidconcept opened this issue Jul 29, 2018 · 2 comments

Comments

@kidconcept
Copy link

kidconcept commented Jul 29, 2018

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

@kidconcept
Copy link
Author

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

@ritlew
Copy link

ritlew commented Feb 1, 2019

@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.

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

2 participants