quickrelease / django-async-downloads Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Raise exception if download was removed from cache during download process (user click to clear download, during uncompleted process).
Exception will be raised depend on function new keyword argument.
Thanks to that celery tasks will be killed instantly.
If the JS is packaged and available on npm with appropriate module exports, then it can be webpacked when included in other projects. This would also require that templates do not rely on global scope for function definitions (e.g. downloads.html
calls clearDownload
).
When the large file is saved.
The bug does not appear on v 0.3.0 and below.
We think that (this probably occurs when the max_size has been reached) bytes remaining in the buffer do not get saved into the temp_file.
Possible solution is to force remaining bytes into the rawstream by calling temp_file.flush()
before line 89
in async_downloads/cache.py
writer = csv.writer(temp_file, lineterminator="\n")
for row in iterable:
writer.writerow(row)
temp_file.flush()
default_storage.save(download["filepath"], temp_file._file.buffer)
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.