Saving attached files from responses to a storage
If your form allows users to attach files in their responses, you can set up these files to be saved to an external storage, e.g., Yandex Object Storage buckets or namespaces on Yandex Disk. This way, you can:
- Manage files in your storage and set up automations for them.
- Choose conditions for file storage and deletion. If you do not use your storage, the files will be stored for a year, after which they will be deleted without the possibility of recovery.
- Bypass the limit on the size and number of attached files.
After you connect an external storage, the attached files from new responses will be saved to it. In Forms, only metadata about these files will be stored, but you will be able to download them via a link in the form settings, on the Responses tab. Files received before you enabled this setting will continue to be stored in Forms for a limited time.
Warning
Maintain enough space in the external storage to download new files. If you run out of space, users will not be able to fill out the form and will be getting the error: Attaching files is temporarily suspended
.
Connect the form to Yandex Disk
Warning
This option is only available for personal forms.
To save attached files from responses to Yandex Disk, open the form, navigate to Settings → Advanced, and activate the option Save attached files from responses to Yandex Disk.
This will create the Yandex.Forms folder on the form owner's Yandex Disk, where files from new user responses will be saved. Files received before you enabled this setting will continue to be stored in Forms for a limited time.
Connecting the form to Object Storage
Warning
This option is only available for business forms.
-
Make sure the form is linked to an organization that has a cloud. To find out the organization, click on For organization in the top panel: the linked organization will be highlighted in the list. You can check if there is a cloud in the Yandex Cloud management console
. If there is no cloud, create one by following the guide. -
The cloud must have a service account. If there is no service account, create one by following the guide.
-
Assign the
storage.editor
role to the service account for writing and reading files in the buckets. -
Create a static access key for the service account by following the guide. Save the created key: you will need it to configure the form.
-
In the Forms interface, open the form you want to connect Object Storage to and, under Save in custom storage in the settings, specify the static key you created in the previous step. The added key will be effective for all forms of this organization.
-
In the Yandex Cloud management console
, go to Object Storage and remember the path to the bucket where you want to save the attached files. If you do not have a bucket, create one by following the guide. -
In the Forms interface, go to the Advanced section of the form settings. In the Save attached files from responses to specified S3 field, specify the
path
to the bucket in thes3://path
format. When saving the settings, the bucket will be checked for availability. If the bucket is unavailable, you will get an error.
If the bucket is available, files from new user responses will be saved to it. Files received before you specified the bucket, will continue to be stored in Forms for a limited time.
To stop saving files to the bucket, in the Forms interface, in the Settings → Advanced form configuration, delete the contents of the Save attached files from responses to specified S3.