Files on Yandex.Disk

If your tasks require images or other files, upload them to Yandex.Disk . You can only use files from Yandex.Disk if it is linked to the same account you are using in Toloka.

To use files on Yandex.Disk in tasks:
  1. Add links to files in the task.

Connecting to Yandex.Disk

To use Yandex.Disk as a data source:

  1. Click Add Ya.Disk on the profile page (the External Services Integration tab) and allow Toloka access to Yandex.Disk.

  2. Click Add proxy and fill in the fields:

    Field

    Description

    Unique name

    Name of the data source. The name will be inserted in the file URLs. Allowed characters in the name: Latin letters, numbers, dashes (“-”).

    Must be unique within Toloka.

    Type

    Choose “Yandex.Disk”.

    Permissions

    Level of access to files:

    • “Public” — All Toloka performers (appropriate for files with instructions).

    • “Private” — Only performers who received a task with this file (appropriate for task content).

    Folder name

    The name of the folder on Yandex.Disk. You can't use a slash (“/”) in the folder name.

    A folder with this name will be created on Yandex.Disk automatically (Applications/Yandex.Toloka/<folder name>).

  3. Click Save.

The Applications/Yandex.Cleanup/<folder name> folder will be created on Yandex.Disk (the name you entered in the URL field). Upload images or other files for tasks to it.

Adding files from Yandex.Disk

Upload files for your tasks to Yandex.Disk and add them to the project:

Project instructions

To add an image to the project instructions:

  1. Click the button on the toolbar.
  2. Insert /api/proxy/<unique name>/<file name> in the field that appears. For example: /api/proxy/yadisk/image1.jpg.
  3. Press Enter.
Restriction. Images from Yandex.Disk are not displayed in the instructions in the mobile app (filter Client = Mobile Toloka).
Task interface

To add a file such as an image or an audio clip in the task interface:

  1. Set the string data type for the input data field in which you will pass the file link.

  2. Insert the file using the proxy <input data field> expression:
    Add:
    • The {{img src=(proxy image)}} component.
    • The <img src={{proxy image}}> HTML tag.
  3. Include relative links to the Yandex.Disk files in the TSV file with tasks. The link format should be <unique name>/<path and filename>. For example: yadisk/image1.jpg or yadisk/photos/image1.png.

Example

Let's say you create a task that shows the performer a photo and asks them to rate it.

Connect Yandex.Disk
  1. Open the External Services Integration page and click Add proxy.
  2. Fill in the fields:
    • Unique name: yadisk
    • Type: Yandex.Disk
    • Access rights: Public
    • Folder name: pics
  3. Click Save.
Set up a project
  1. Open the template list.
  2. Choose the Image classification template.
  3. Change the input field type from image to string.
  4. Change the component in the HTML block to {{img src=(proxy image)}}.
  5. Open the External Services Integration page in a new tab and copy the /yadisk/example.jpg link.
  6. Go back to project creation and click Preview.
  7. Click Change input data.
  8. Replace Text from the image field with the copied link.
  9. Click Apply. The first task will display the picture.
    Task view with a picture
  10. Save the project.
Upload files
Upload files to the Applications/Yandex.Toloka/yadisk folder in the web interface or using the Yandex.Disk app.
Use links
  1. In the project instructions, use links in the /api/proxy/<unique name>/<file name> format.
  2. Include relative links <unique name>/image1.jpg in the INPUT field in the TSV file Then upload tasks to the pool.
  3. Click Preview in the pool and make sure that the files are available in the task.

    If the files are unavailable, make sure they are in the Applications/Yandex.Toloka/yadisk folder and try refreshing the token on the External Services Integration page.