summaryrefslogtreecommitdiff
path: root/boto/mturk/connection.py
diff options
context:
space:
mode:
Diffstat (limited to 'boto/mturk/connection.py')
-rw-r--r--boto/mturk/connection.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/boto/mturk/connection.py b/boto/mturk/connection.py
index 14b8ced0..4f2a23fa 100644
--- a/boto/mturk/connection.py
+++ b/boto/mturk/connection.py
@@ -440,6 +440,21 @@ class MTurkConnection(AWSQueryConnection):
params['RequesterFeedback'] = feedback
return self._process_request('ApproveRejectedAssignment', params)
+ def get_file_upload_url(self, assignment_id, question_identifier):
+ """
+ Generates and returns a temporary URL to an uploaded file. The
+ temporary URL is used to retrieve the file as an answer to a
+ FileUploadAnswer question, it is valid for 60 seconds.
+
+ Will have a FileUploadURL attribute as per the API Reference.
+ """
+
+ params = {'AssignmentId': assignment_id,
+ 'QuestionIdentifier': question_identifier}
+
+ return self._process_request('GetFileUploadURL', params,
+ [('FileUploadURL', FileUploadURL)])
+
def get_hit(self, hit_id, response_groups=None):
"""
"""
@@ -915,6 +930,14 @@ class HIT(BaseAutoResultElement):
expired = property(_has_expired)
+class FileUploadURL(BaseAutoResultElement):
+ """
+ Class to extract an FileUploadURL structure from a response
+ """
+
+ pass
+
+
class HITTypeId(BaseAutoResultElement):
"""
Class to extract an HITTypeId structure from a response