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

Adding custom options to support chunking upload #39

Closed
Gresliebear opened this issue Jun 24, 2020 · 5 comments
Closed

Adding custom options to support chunking upload #39

Gresliebear opened this issue Jun 24, 2020 · 5 comments

Comments

@Gresliebear
Copy link

We are trying to implement chunking in our applications but it requires custom options for drop.zone.config.

Would you be interested in adding chunking? or point us in the right direction to improve the flask-dropzone to be more complex.

What is the limitation

@greyli
Copy link
Member

greyli commented Jun 27, 2020

For complex scenarios, I will recommend just use Dropzone.js directly without this extension, check out this tutorial for chunking upload with Flask and Dropzone.js.

If you want to support chunking upload with this extension, you can pass the related configurations with custom_options currently:

{{ dropzone.config(custom_options='chunking: true, forceChunking: true, chunkSize: 1000000,') }}

Possible duplicate with #25.

@greyli greyli changed the title Adding more keywords Adding custom options to support chunking upload Jun 27, 2020
@Gresliebear
Copy link
Author

We prefer config file in python that's why I and my buddy are deciding whether or not to fork the code but we were wondering how you write a class, for instance, to add new custom options. We are looking to add classes to your repo or to fork, but we have to read all files and start testing it.

we were asking if you could tell us how to do it faster, or if it's impossible?

@greyli
Copy link
Member

greyli commented Jul 1, 2020

If you just want to store the config value in Python, maybe put it in a dict, then assemble it like this:

import json

config = {'chunking': True, 'forceChunking': True, 'chunkSize': 1000000}
config_string = str(json.dumps(config )).replace('"', '')[1:-1]  # pass this to custom_options

@Gresliebear
Copy link
Author

Thank you we will do this, and get back to you

@greyli
Copy link
Member

greyli commented May 1, 2021

Closing it now for inactive. Please feel free to reopen or comment.

@greyli greyli closed this as completed May 1, 2021
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