xrmx commented on a change in pull request #4298: Refactor import csv
URL:
https://github.com/apache/incubator-superset/pull/4298#discussion_r164989153
##########
File path: superset/utils.py
##########
@@ -513,6 +513,17 @@ def table_has_constraint(table, name, db):
return False
+def upload_file(file):
+ """Takes in the name of the file to be uploaded and uploads that file"""
+
+ from superset import app
+ config = app.config
+ if not file or not file.filename:
Review comment:
Can this happen in practice? You have one caller of this function so you can
be pretty sure that a proper file is passed down.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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