Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing upload_path for bucket job #29

Merged
merged 1 commit into from
Jul 12, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions modelconvert/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,11 @@ def add_job():
resp = jsonify(message="Please specify the payload_filename attribute in your request.")
resp.status_code = 400 # bad
return resp

filename = data['payload_filename'] #refactor this

current_app.logger.debug("Using Bucket ID: {0} with entry point filename".format(url.netloc, filename))
options.update(hash=url.netloc)
upload_directory = os.path.join(current_app.config['UPLOAD_PATH'], url.netloc)
filename = os.path.join(upload_directory, data['payload_filename'])
else:
current_app.logger.error("Unknown payload resource identifier")
resp = jsonify(message="No recognizable payload URI provided. Please use bucket:// or http://")
Expand Down