Using files from 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.

Connect Yandex.Disk

To use Yandex.Disk as a data source:

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

  2. Click Add proxy and fill in the fields:

    Field

    Overview

    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

    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/Toloka/<folder name>).

  3. Click Save.

  4. Upload files for tasks or instructions to the folder. It will be located at Applications/Toloka/<folder name> (the name you entered in the field).

Add files to the task interface

To add a file to the task interface:

  1. Select the component type. For example, "view.image" — to insert a picture, "view.audio" — for audio files, "view.video" — for video files.
  2. In the "url" property, select the "@yandex-toloka/helper.proxy" type.
  3. In the "path" property, enter the structure /<proxy name>/<file name>.<type> with your data.

View an example with image classification.

Tip. To avoid entering the file path manually, copy the URL field from the External Services Integration tab and change the file name and type.

An example of adding files from Yandex.Disk in Template Builder:

{
"type": "view.image",
"url": {
  "type": "@yandex-toloka/helper.proxy",
  "path": "/my-proxy/example.jpg"
  }
}
Copied to clipboard

You can also add links to files in the /<proxy name>/<file name>.<type> format to the input data and refer to them in the configuration. Don't forget that array elements start from zero:

{
"type": "view.image",
"url": {
  "type": "@yandex-toloka/helper.proxy",
  "path": {
    "type": "data.input",
    "path": "images.0"
    }
  }
}
Copied to clipboard

View example in the sandbox.

Add files to the instructions

Attention. Set the access rights for the folder with instructions to “Public”.

To add an image to the project instructions:

  1. In the Instructions field on the toolbar, click .
  2. Insert /api/proxy/<proxy name>/<file name>.<type> in the field that appears. For example: /api/proxy/my-proxy/example.jpg.
  3. Press Enter.

Troubleshooting

I can't upload files from Yandex.Disk

If images, audio or video files from Yandex.Disk don't appear in the instructions or on the task page, make sure you connected Yandex.Disk correctly and uploaded the files.

How to create a task where the performer has to view a video from Yandex.Disk

To create such a task, take the video markup template as a basis.

To host your videos on Yandex.Disk, connect Yandex.Disk and set up the project.

Why can't my task for selecting objects in an image display images from Yandex.Disk?
The problem is in your task template. Make sure that:
  • In the project, the input field where you pass the file link has the “string” type.
  • The component in the task template uses the "proxy" expression.
  • The format of relative links in the TSV file with tasks is correct: <unique name>/<file path and name>.
For detailed instructions and videos, see the page Using files from Yandex.Disk.
Frequent mistakes when connecting to Yandex.Disk and uploading files
  • The Input data field in the project settings has the link type. You should choose the string type.
  • The TSV file contains absolute references to the task files. You need to insert a link <unique name>/<path and file name>. For example: yadisk/image1.jpg or yadisk/photos/image1.png.
  • Photos from Yandex.Disk are used in the task instructions in the mobile app. To display the photos in the instructions, use only direct links.
  • Files are deleted or aren't located in the Yandex.Disk folder that the link leads to.
  • The OAuth token isn't active. Update the token on the External Services Integration page.
To display files from Yandex.Disk (images, audio files, videos) to the performer:
  1. Link Yandex.Disk in your profile.
  2. Set the string type for the input data field.
  3. Insert a file link using the proxy component.

Detailed instructions

How to create a task where the performer has to view a video from Yandex.Disk

To create such a task, take the video markup template as a basis.

To host your videos on Yandex.Disk, connect Yandex.Disk and set up the project.

Why can't my task for selecting objects in an image display images from Yandex.Disk?
The problem is in your task template. Make sure that:
  • In the project, the input field where you pass the file link has the “string” type.
  • The component in the task template uses the "proxy" expression.
  • The format of relative links in the TSV file with tasks is correct: <unique name>/<file path and name>.
For detailed instructions and videos, see the page Using files from Yandex.Disk.
Files load too slowly from Yandex.Disk. How do I speed up the loading process?

Try the recommendations on this page or contact Yandex.Disk support.

How do I embed multiple images from Yandex.Disk?

To add images using links to Yandex.Disk, use the link format: /api/proxy/proxy name/path to image.

In the requester profile settings, under External Services Integration → Proxy settings, set up integration with external services. For more information, see this page.

Why doesn't the task preview show my images from Yandex.Disk?
The problem is in your task template. Make sure that:
  • In the project, the input field where you pass the file link has the “string” type.
  • The component in the task template uses the "proxy" expression.
  • The format of relative links in the TSV file with tasks is correct: <unique name>/<file path and name>.

Detailed instructions.

How do I add a video hosted on Yandex.Disk to my task?

You can base it on the video markup template.

To host your videos on Yandex.Disk, connect Yandex.Disk and set up the project.