You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/02/03 14:29:18 UTC

[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #9047: [csv upload] Use python's named temp file

dpgaspar 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_r374132406
 
 

 ##########
 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:
   Yes, tested and it's safe

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org