Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit 3932706

Browse files
committed
tmp
1 parent 0a0a6ee commit 3932706

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

paperspace/workspace.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ def upload_workspace(self, input_data):
9696
archive_path = self._zip_workspace(workspace_path)
9797

9898
file_name = os.path.basename(archive_path)
99-
s3_upload_data = self._get_upload_data(file_name)
99+
project_handle = input_data['projectHandle']
100+
s3_upload_data = self._get_upload_data(file_name, project_handle)
100101
bucket_name = s3_upload_data['bucket_name']
101102

102103
self.logger.log('Uploading zipped workspace to S3')
@@ -114,8 +115,9 @@ def upload_workspace(self, input_data):
114115

115116
return 's3://{}/{}'.format(bucket_name, file_name)
116117

117-
def _get_upload_data(self, file_name):
118-
response = self.experiments_api.get("/workspace/get_presigned_url", params={'workspaceName': file_name})
118+
def _get_upload_data(self, file_name, project_handle):
119+
response = self.experiments_api.get("/workspace/get_presigned_url",
120+
params={'workspaceName': file_name, 'projectHandle': project_handle})
119121
if response.status_code == 404:
120122
raise PresignedUrlUnreachableException
121123
if response.status_code == 403:

0 commit comments

Comments
 (0)