craig-rueda commented on a change in pull request #9047: [csv upload] Use
python's named temp file
URL:
https://github.com/apache/incubator-superset/pull/9047#discussion_r372518595
##########
File path: superset/views/database/views.py
##########
@@ -91,11 +91,14 @@ def form_post(self, form):
return redirect("/csvtodatabaseview/form")
csv_file = form.csv_file.data
- form.csv_file.data.filename =
secure_filename(form.csv_file.data.filename)
+
csv_filename = form.csv_file.data.filename
- path = os.path.join(config["UPLOAD_FOLDER"], csv_filename)
+ extension = os.path.splitext(csv_filename)[1].lower()
Review comment:
Probably best if we don't deal with extensions at all.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]