File Upload Uppy field does not work when used with anonymous user

Created on 5 July 2024, 5 months ago
Updated 1 August 2024, 4 months ago

Problem/Motivation

I have added the display field File upload by Uppy to my field image, when I use this field in add content with my admin user, this field and form works but if I use anonymous user in publish form, not upload field, there is an error with CSRF token. We have disabled in File Upload on routing module the CSRF configuration and now I upload files, but when I submit the form, it detects this field empty.

Steps to reproduce

Add image field to a content
Apply File Upload Uppy display in form to Image field
Add permissions to an anonymous user so that he/she can create this content and access the form.
Fill in the form and insert an image in the Uppy field.

You should get an error when uploading the file.

If we remove the permission on File Upload from the CSRF token, it should allow to upload the file but the form gives an error because it detects that this field is empty even though the file has been uploaded.
Delete this line:
_custom_access: Drupal\file_uploader\Controller\FileUploaderController::access

Fill in the field and submit the form:

The form gives an error that the field is empty, and the field empties itself:

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024