我正在尝试在 Mechanical Turk 上测试文件上传。
我正在调用 GetFileUploadURL 服务,我的查询字符串如下所示:
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
我的 HIT HTML 看起来像这样
<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> </p>
<p><input type="file" name="smiley" value="" /></p>
我收到一个错误 "The value \"null\" is not valid for the parameter QuestionIdentifier"
尽管我正在通过QuestionIdentifier
中。
我猜我的 HIT HTML 不是最理想的,而且我遗漏了一些可以让这一切变得更容易的东西。我能写出 <input type="file" name="smiley" value="" />
以外的东西吗?或以某种方式改进它,使此 Web 服务调用更容易? 我真的不确定我应该在我的 GetFileUploadURL
中传递什么调用QuestionIdentifier
我假设 "smiley"
会工作。
编辑:我知道它应该是smiley
基于我调用 GetAssignmentsForHIT
时看到的结果.
有什么想法吗?为什么它认为它是空的?将参数传递给此服务时顺序重要吗?
最佳答案
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.
因此此方法用于检索已上传的文件。听起来好像您正在尝试使用这种不正确的方法执行上传。如文档所述,请参阅 QuestionForm以及有关 FileUploadAnswer
的详细信息,以了解上传的工作方式
关于web-services - Mechanical Turk 文件上传,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1114847/