You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using dropzone in a flask application that uploads files to AWS S3. I have the following configuration for the dropzone:
app.config.update(
DROPZONE_MAX_FILES=10,
DROPZONE_PARALLEL_UPLOADS=3,
DROPZONE_UPLOAD_MULTIPLE=True,
DROPZONE_ALLOWED_FILE_CUSTOM=True,
DROPZONE_MAX_FILE_SIZE=10000,
DROPZONE_ALLOWED_FILE_TYPE=".xls, .xlsx, .csv, .doc, .rtf",
DROPZONE_DEFAULT_MESSAGE="<br/><br/><br/>Drag files here or click to select",
DROPZONE_UPLOAD_ON_CLICK=True,
DROPZONE_UPLOAD_BTN_ID="upload_button",)
I notice that with this method, if a single file fails the upload (for ex, if the file is of the wrong type) none of the files are uploaded. The behavior that I would expect is that all of the other files continue to upload and only the single file that fails the file extension test does not upload. Below is the code for upload function in the flask application:
def upload():
if request.method == "POST":
for key, file in request.files.items():
if key.startswith('file'):
# Save file locally
if not os.path.exists(tmp_folder_path):
os.mkdir(tmp_folder_path, 0o777)
file.save(os.path.join(tmp_folder_path, file.filename))
return render_template("index.html")
I'm using Python 3.7.4 with the following packages:
I'm using dropzone in a flask application that uploads files to AWS S3. I have the following configuration for the dropzone:
I notice that with this method, if a single file fails the upload (for ex, if the file is of the wrong type) none of the files are uploaded. The behavior that I would expect is that all of the other files continue to upload and only the single file that fails the file extension test does not upload. Below is the code for upload function in the flask application:
I'm using Python 3.7.4 with the following packages:
boto3==1.16.11
botocore==1.19.11
click==7.1.2
Flask==1.1.2
Flask-Dropzone==1.5.4
itsdangerous==1.1.0
Jinja2==2.11.2
jmespath==0.10.0
MarkupSafe==1.1.1
python-dateutil==2.8.1
s3transfer==0.3.3
six==1.15.0
urllib3==1.25.11
Werkzeug==1.0.1
The text was updated successfully, but these errors were encountered: