Hi!

Maybe I am just blind but is there a way to specify the upload directory somewhere in the privat directory of D7 in case someone is asked to upload some private data? If there is no way to do this right now, whould this be a feature for the future?

Thanks a lot for this great module!
Kind Regards
Marcus

Comments

quicksketch’s picture

Status: Active » Closed (duplicate)
quicksketch’s picture

Status: Closed (duplicate) » Active

I should be more clear. There's no way to make *a single file component* private and have the rest be public. Webform will always save files into the default file scheme. So if you have the default scheme set to private, Webform will use that.

shinmaikeru’s picture

Your comment "if you have the default scheme set to private, Webform will use that." sounds like what I am looking for, but I don't know how to achieve this.

I am trying to create a webform in latest D7 through which conference applications upload CVs, recommendation letters, etc. to compete for places in a funded workshop.
Applicants will access the site as anonymous users. No accounts.
Once submitted, the applicant does not need access to form data or uploads.

I created a role that has access only to its own webform results, and I created a user in that role, so I think that is okay, but I don't know how to protect the uploaded files.

I want all the uploads for that webform to be accessible only to the site administrator and the Author of the webform.

Is what you are talking about a solution? And if so, please point me to some documentation on how to set that. I cannot find it.

Thank you.

quicksketch’s picture

The default file scheme is for *your entire site*, so just be aware that you'll be affecting a lot more than just Webform with the change. The default option is available under admin/config/media/file-system, "Private local files served by Drupal".

quicksketch’s picture

Status: Active » Closed (duplicate)

There's now a patch in #289919: Provide AJAX-based file uploads/Progress Bar for uploads that adds full private file support in Drupal 7. You can even mix private and public file components within the same form.

Andrés Chandía’s picture

Version: 7.x-3.x-dev » 7.x-4.2
Issue summary: View changes

The default file scheme is for *your entire site*, so just be aware that you'll be affecting a lot more than just Webform with the change. The default option is available under admin/config/media/file-system, "Private local files served by Drupal".

And how or where I tell webform to change the webform directory from ...files/webform to ...files/private/webform
I've been searching around because I think I see at some point of the configuration process this setting but I can not find it again.....

Thanks

Andrés Chandía’s picture

Status: Closed (duplicate) » Closed (works as designed)

No worries, I have found it in the form inside of the file field options

Upload destination

  • Public files
  • Private files

Private file storage has significantly more overhead than public files, but restricts file access to users who can view submissions.

Andrés Chandía’s picture

Status: Closed (works as designed) » Active

Sorry, I'm reopening because it save the files at the public directory anyway, even though I have check the option of private file, so I guess there is a setting to change somewhere..... where?

babusaheb.vikas’s picture

You need to follow these step:
#1 You need to set "Private file system path" from admin/config/media/file-system as "sites/default/files/private".
#2 Configure your field "public" to "private" during creating field in webform.

Andrés Chandía’s picture

It didn't work for me:
#1: Done.
#2 : "Private fields are shown only to users with results access." : Done
#3: Permissions: "Access own webform results " and "Access own webform submissions" Done.
But when going to the form with an authenticated user the field I have marked as Privete is not shown, I can not give to authenticated user permission to "Access all webform results", is not safe.

I cleaned the cache just in case, but nothing...

DanChadwick’s picture

Category: Feature request » Support request
Status: Active » Closed (fixed)

Re #10. You are confusing private webform components with the file storage scheme of public versus private.

1) Configure yoru private file page as directed. You can also configure a public path, if you want that too.

2) In each webform file component, you can pick which scheme (public or private), assuming you have more than one defined. If you only have one (e.g. public), then there is no choice and the option is not displayed.

3) Open a different issue if you are still having trouble. However, with the information you've given, I think you will need to debug this yourself in your development environment. I suspect you have some sort of configuration issue. If you only have the private file system defined, then it would be impossible to store public files.

As a general rule, don't reopen an old issue unless you know there is a problem with the patches or solution to that issue. Your issue is unrelated to ADDING private files to webform. You are having trouble using the existing functionality.

Good luck.

Andrés Chandía’s picture

Thanks a lot, I don't know how, but it is magically working now...

Thanks anyway!