If you have a file upload field on a webform, the user that submitted the file can not view his/her own file.

I found that the only way to allow the user to view his/her uploaded file is to give the permissions "view any webform submission".

Is this intended behaviour?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

weseze created an issue. See original summary.

jrockowitz’s picture

Status: Active » Postponed (maintainer needs more info)

I can't reproduce this issue using the below steps....

  • Add 'File' element to Contact form. ((/admin/structure/webform/manage/contact/elements)
  • Goto Access tab (/admin/structure/webform/manage/contact/handlers)
  • Set 'VIEW OWN WEBFORM SUBMISSIONS' to desired role or user
  • Login as user with 'VIEW OWN WEBFORM SUBMISSIONS'
  • Submit 'Contact' form with a file (form/contact)
  • View previous submissions (/webform/contact/submissions)
  • Confirm that uploaded file is accessible.

Notes

  • Anonymous users can never access private file uploads
  • 'View own submissions' and most submission access controls are currently only form specific permissions.
  • Maybe there needs to be more help about managing Webform and submission permissions.
weseze’s picture

Indeed it works as you describe.

Coming from webforms on Drupal 7 I expected the permission "view own submissions" to be on the general permission page, not on a tab within the webform itself.
A small reference on the general permission "view any webform submission" would indeed be very helpful!

jrockowitz’s picture

Status: Postponed (maintainer needs more info) » Needs review
FileSize
2.72 KB
139.12 KB

Yep, someone could write a very helpful and populate blog post that documents the difference between Webform for D7 and D8.

Below is a screenshot of the notes that I added to the permissions page.

  • jrockowitz committed 8781b38 on 8.x-5.x
    Issue #2860472 by jrockowitz, weseze: Viewing own uploaded files not...
jrockowitz’s picture

Status: Needs review » Fixed

I committed the patch. Please download the latest release to review.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.