leriomaggio / django2-resumable Goto Github PK
View Code? Open in Web Editor NEWDjango 2.0 App integrating resumable-js in forms and admin for large files upload
License: MIT License
Django 2.0 App integrating resumable-js in forms and admin for large files upload
License: MIT License
django does not fill POST dictionary for non-forms since version 1.5
https://docs.djangoproject.com/en/2.2/ref/request-response/#django.http.HttpRequest.POST
My POST request from resumable.js looks like this:
<WSGIRequest: POST '/demo/resumable_upload?resumableChunkNumber=1&resumableChunkSize=1048576&resumableCurrentChunkSize=694&resumableTotalSize=694&resumableType=text%2Fplain&resumableIdentifier=694-readmetxt&resumableFilename=readme.txt&resumableRelativePath=readme.txt&resumableTotalChunks=1&content_type_id=application%2Foctet-stream&field_name=file'>
But
print (request.POST)
<QueryDict: {}>
The code fails in get_chunks_upload_to in the line
ct_id = request.POST['content_type_id']
with
Traceback (most recent call last):
django.utils.datastructures.MultiValueDictKeyError: 'content_type_id'
It is obvious that this project is heavily inspired by https://github.com/jeanphix/django-resumable
It would be fair to at least mention the original project.
Also you have fixed some bugs and I consider using your project instead of the original one that seems unmaintained.
Could you update the instruction in the readme to install through pip pip install git+https://github.com/leriomaggio/django-resumable.git
Maybe consider renaming this project and register it in pipy to avoid confusion
Documentation shows how to add different restrictions (like login_required or staff_member_required) to the standard resumable upload url.
The current widget template, though, only supports "resumable-upload" view. It would be nice to have a target parameter in the widget (or even in the field? Unsure about this) for configuring a different endpoint.
The release packaged on PyPi is lacking both static/ and templates/ dirs - it only contains .py files.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.