views:

532

answers:

1

I'm trying to test file uploads on Mechanical Turk.

I'm calling the GetFileUploadURL service and my query string looks something like this:

Operation=GetFileUploadURL&AssignmentId=XXX&Signature=XXX&Version=2008-08-02&AWSAccessKeyId=XXX&Timestamp=2009-07-11T18%3A33%3A03-04%3A00&QuestionIdentifier=smiley&HITId=XXX&Service=AWSMechanicalTurkRequester

My HIT HTML looks like this

<ul>
    <li>Draw me a smily face.</li>
    <li>Save it as a PNG</li>
    <li>Image must be 64x64</li>
    <li>Be Creative</li>
</ul>
<p>&nbsp;</p>
<p><input type="file" name="smiley" value="" /></p>

I'm getting an error back that "The value \"null\" is not valid for the parameter QuestionIdentifier" even though I am passing the QuestionIdentifier in.

I'm guessing that my HIT HTML is not the most ideal and that I'm missing something that would have made this a lot easier. Could I have written something other than <input type="file" name="smiley" value="" /> or improved it in some way that this web service call would be easier? I'm really not sure what I was supposed to pass in my GetFileUploadURL call for QuestionIdentifier and I assumed that "smiley" would work.

edit: I know that its supposed to be smiley base upon the results I see when I call GetAssignmentsForHIT.

Any ideas? Why does it think its null? Does order matter when passing parameters to this service?

A: 

From the API documentation:

The GetFileUploadURL operation generates and returns a temporary URL. You use the temporary URL to retrieve a file uploaded by a Worker as an answer to a FileUploadAnswer question for a HIT. For information about the FileUploadAnswer answer, see QuestionForm.

So this method is for retrieving files that have already been uploaded. It sounds as though you are trying to perform the upload with this method which is incorrect. As the documentation says, see QuestionForm and the details on FileUploadAnswerto find out how the upload should work

barrowc
It looks like I could *not* generate a file-upload question from the template-based HIT designer. However, when I clicked on "create HIT's individually" I got a nice little button that allowed me to add a file-upload control and everything worked as documented. So, yeah, I guess I was using the wrong control.Now... how do I add that control from the templated-based designer? I want to know because the "manage individually" designer seems to allows only one control on the form.
Jason M