Mechanical Turk:将文件发布到外部提交接口?

发布于 2024-09-06 09:40:01 字数 1842 浏览 6 评论 0原文

我已经为 Mechanical Turk 设置了自己的自定义表单,并发布到他们的外部界面。

<form enctype="multipart/form-data" action="https://workersandbox.mturk.com/mturk/externalSubmit" method="post" name="mturk_form" id="mturk_form">
          <p>
            <label for="turk_task_image_image">Upload an image</label><br>
            <input type="file" size="30" name="turk_task_image[image]" id="turk_task_image_image">
          </p>

          <b>- OR - </b><br><br>
          <p>
            <label for="turk_task_image_url">Specify an Image URL</label><br>
            <input type="text" size="30" name="turk_task_image[url]" id="turk_task_image_url">
          </p>

          <p>
            <label for="turk_task_image_description">Description (optional)</label><br>
            <textarea rows="3" name="turk_task_image[description]" id="turk_task_image_description" cols="80"></textarea>
          </p>
  <input type="hidden" value="ASSIGNMENT_ID_NOT_AVAILABLE" name="assignmentId" id="assignmentId">

  <input type="hidden" value="200" name="task[storyboard_location_id]" id="task_storyboard_location_id">
  <input type="hidden" value="36" name="task[turk_task_id]" id="task_turk_task_id">

  <p>
    <input type="submit" value="You must ACCEPT the HIT before you can submit the results." name="commit" id="submitButton" disabled="">
    <img border="0" style="display: none;" src="/images/spinner.gif?1274319066" id="spinner" alt="Spinner">
  </p>

</form>

当我去检索响应时,所有文本字段值都可用,但发布的文件不可用。根据 API 文档,我应该收到另一个 url,使上传的文件可供下载?

如何获取发布到 externalSubmit 接口的文件的 url?

PS 顺便说一句,我正在使用 rturk gem 来构建这些 HIT。但我在代码中没有看到任何有关对已发布上传文件的支持的信息。

I have setup my own custom form for mechanical turk and am posting to their external interface.

<form enctype="multipart/form-data" action="https://workersandbox.mturk.com/mturk/externalSubmit" method="post" name="mturk_form" id="mturk_form">
          <p>
            <label for="turk_task_image_image">Upload an image</label><br>
            <input type="file" size="30" name="turk_task_image[image]" id="turk_task_image_image">
          </p>

          <b>- OR - </b><br><br>
          <p>
            <label for="turk_task_image_url">Specify an Image URL</label><br>
            <input type="text" size="30" name="turk_task_image[url]" id="turk_task_image_url">
          </p>

          <p>
            <label for="turk_task_image_description">Description (optional)</label><br>
            <textarea rows="3" name="turk_task_image[description]" id="turk_task_image_description" cols="80"></textarea>
          </p>
  <input type="hidden" value="ASSIGNMENT_ID_NOT_AVAILABLE" name="assignmentId" id="assignmentId">

  <input type="hidden" value="200" name="task[storyboard_location_id]" id="task_storyboard_location_id">
  <input type="hidden" value="36" name="task[turk_task_id]" id="task_turk_task_id">

  <p>
    <input type="submit" value="You must ACCEPT the HIT before you can submit the results." name="commit" id="submitButton" disabled="">
    <img border="0" style="display: none;" src="/images/spinner.gif?1274319066" id="spinner" alt="Spinner">
  </p>

</form>

When I go to retrieve the responses, all of the text field values are available but the posted file is not. According to the API docs, I should receive another url that should make the uploaded file available for download?

How do I go about getting the url of the file that is posted to the externalSubmit interface?

P.S. On a side note, I am using the rturk gem to build up these HITs. But I see nothing in the code regarding the support for posted uploaded files.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

始终不够爱げ你 2024-09-13 09:40:01

从我从开发者论坛收集到的信息来看,外部接口似乎不支持文件上传。

我看到一个线程,开发人员认为他们将来会实现它,但那是在 2008 年。

另一个线程,有人指出您必须单独处理文件上传到服务器和外部提交表单的提交。

http://solutions.amazonwebservices.com/connect/thread.jspa ?messageID=125657𞫙
http://solutions.amazonwebservices.com/connect/thread.jspa ?messageID=92072𖞨
http://solutions.amazonwebservices.com/connect/thread.jspa ?messageID=97431

From what I can gather from the developer forums, it doesn't look like the external interface supports file uploads.

I saw one thread where a developer thought that they were going to implement it in the future but that was in 2008.

Another thread where someone states that you must handle the uploading of the file to your server and the submission of the externalSubmit form separately.

http://solutions.amazonwebservices.com/connect/thread.jspa?messageID=125657𞫙
http://solutions.amazonwebservices.com/connect/thread.jspa?messageID=92072𖞨
http://solutions.amazonwebservices.com/connect/thread.jspa?messageID=97431𗲗

I'm currently exploring an AJAXy upload interface for the file upload along with a separate externalSubmit form for the image details.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文