All Questions

Tagged with
Filter by
Sorted by
Tagged with
16
votes
3answers
6k views

Django and Dropzone.js

When I upload files with dropzone it adds them to the database, but they don't have a file, just an ID and creation date. I think the view is the problem but I've tried tons of stuff and I can't ...
11
votes
3answers
3k views

Dropzone.js prevents Flask from rendering template

I am using Dropzone.js to allow drag and drop upload of CSV files via a Flask web site. The upload process works great. I save the uploaded file to my specified folder and can then use df.to_html() to ...
5
votes
2answers
2k views

How to upload multiple images in Django using Dropzone for multiple image fields

I am working on a project where the functionality is the user can upload his multiple images with a drag-n-drop feature. I am developing using the Django-python. I have implemented the functionality ...
4
votes
1answer
2k views

Flask redirect doesn't work after upload

I basically want to go to a different page after the upload. What happens here is that the file is uploaded very quickly and saved on the server, but after that the client(my browser) is in the ...
2
votes
1answer
2k views

django and dropzone how to post form

I have gone through django and dropzone. I have implemented drag and drop feature of dropzone in django. My templates look like: <form id="add-multiple" class="dropzone" action="{% url "name_add" %...
2
votes
1answer
2k views

Django upload and process file with no data retention

Python: 2.7.11 Django: 1.9 I want to upload a csv file to Django and analyze it with a Python class. No saving is allowed and the file is only needed to reach the class to be analyzed. I'm using ...
2
votes
0answers
48 views

How to pass additional data to the post_ajax method?

I have the models: class MyModelOne(models.Model): title = models.CharField(verbose_name=_('Title'), max_length=255) body = models.TextField(verbose_name=_('Body')) # some other fields ...
2
votes
1answer
835 views

Uploading files using flask-dropzone returns 'Server error: 0' [duplicate]

I'm trying to upload a file to localhost using Dropzone JS and a Flask backend. I installed the flask-dropzone module via pip, and initialized dropzone successfully. This means the front-end is all ...
1
vote
2answers
2k views

Python bottle - How to upload media files without DOSing the server

I was using the answer from this question and saw the comment: raw = data.file.read() # This is dangerous for big files How do I upload the file without doing this? My code so far is: @bottle....
1
vote
5answers
2k views

How do i include the csrf_token to dropzone Post request (Django)

Allright this is resolved. Just editing in case anyone runs into the same problem. Add the Code posted in Comment marked as answer in the same javascript file. When defining var myDropzone = new ...
1
vote
2answers
1k views

Dropzone doesn't redirect after upload to Flask app

I'm writing a resource to upload files to a Flask app using Dropzone. After files are uploaded the app should redirect to the hello world page. This is not happening and the app is stuck on the view ...
1
vote
1answer
1k views

Manage multiple files upload in Django

I am trying to upload multiple files in Django and store them in the system through DropzoneJS. I get files in the MultiValueDict Dictionary in request.FILES. But, it looks like: <MultiValueDict: {...
1
vote
0answers
54 views

DropzoneJS - progressBar not waiting end of process

I'm currently building a little upload forms into my Python Flask web app. I use dropzone.js to have their powerful drag and drop file handler. So after upload the file will be process by some ...
1
vote
0answers
234 views

Dropzone JS with flask: chunking parallel uploading

I'm trying to use dropzone js with flask as backend. Dropzone configuration: <form method="POST" action='/process_chunk' class="dropzone dz-clickable" id="dropper" enctype="multipart/form-...
1
vote
1answer
54 views

After flask redirect i have invalid data

I want to use Dropzone.js with Flask. After uploading file i want save file and show uploaded file name in another page (after redirect). But in browser i receive file name equals "sample_value". How ...
1
vote
1answer
472 views

Send CSRF Token in dropzone

I have tried to send csrf token in my AngularJS/Django app using the following code. The $rootScope.CSRFToken contains token value that is received from Cookie object. All other services are working ...
1
vote
1answer
44 views

Unknown code being added to HTML template when running local server

I was building a profile picture feature, it was working fine so I left it for a while, probably a week. I came back to it and ran the local server, but when I do there's a few lines that appear in ...
1
vote
2answers
1k views

Dropzonejs - Doesn't show progress bar / complete status and doesnt hide fallback form

I'm using latest dropzone.js, version 3.2.0. I downloaded the folder and have all files needed. Using latest Chrome. When i drop a file, dropzone sends it to the server, and i successfully save it, ...
1
vote
1answer
437 views

How can i upload files on dropzone.js with style=“display: none;” using Selenium?

I'm trying to upload files on a website which using dropzone.js for file uploads. I've found the file upload field in form, but the script stops without throwing any error. I've also used ...
0
votes
1answer
389 views

How to pass image uploaded with flask dropzone to another page

So I have uploaded an image into the uploads folder with flask dropzone and I want to be able to pass it to my makeMeme page so I can then display that image using the html img tag. Here is how I ...
0
votes
1answer
76 views

Django and Dropzone.js methodology, creating an instance with images

I have 2 models Listing and Image, where a listing can have multiple images. class Listing(models.Model): title = models.CharField(max_length=100, blank=False) class ListingImage(models.Model): ...
0
votes
0answers
29 views

Is it possible to send a file from your local pc to a dropzone on a website using Python

As the title says is it possible to upload a file like that or is there an even better way to work it around? Website below is an example. If I would like to make a script in python there I can set a ...
0
votes
0answers
86 views

Upload files to Django

I am using a DropzoneJS Plugin in my Django project. I want to upload files to the database (The problem is that I am uploading blank file objects without a file attached). These are the models: ...
0
votes
0answers
134 views

Flask store chunked file temporarily then upload

Problem Statement: I have a flask server hosted in pythonanywhere.com. What my website does is, user upload zip files (apk, ipa zipped) from my website, Flask takes it, then uploads it to object ...
0
votes
1answer
131 views

File upload using Dropzone but it doesn't upload to the folder

Here is my code. It adds to the database but it doesn't upload to the folder. I don't know where to put the path foldername wherein the file should be uploaded and I don't know how to retrieve the ...
0
votes
1answer
423 views

Standard FileField as dropzone upload area in Django form

How can I set myfile form field as Dropzone.js upload area? forms.py class TestForm(forms.Form): title = forms.CharField(required=True) myfile = FileField() views.py class ExampleView(...
0
votes
0answers
736 views

Multiple file upload in django

I need to upload multiple files in my django app. I want to use some sightly jquery plugin such as jQuery File Upload or dropzonejs. But they are using ajax upload. It's ok when I'm download file to ...
0
votes
1answer
1k views

get last insert ID

So the question is how to get the id when view function try to save() the object.? I am using dropzonejs for uploading file to the server. Whenever User drag & drop the file without waiting it ...
-1
votes
1answer
514 views

Getting a JSON Response from the Django

EDIT: As asked, the thing that I'm trying to obtain is the following: POST with the file from template --> File process in the view, generate an id --> id displays in template I'm new to Django, and ...