Message Boards

Liferay Forms Upload file without signing in

Md Rashedul Hasan Khan, modified 3 Years ago.

Liferay Forms Upload file without signing in

New Member Posts: 18 Join Date: 5/15/17 Recent Posts

Hi All

 

I'm developing a form where I used Upload to upload file. This upload works if I'm logged in to Liferay. Without logging in to Liferay it doesn't allow to upload file and shows a message asking to sign in to upload file like the following:

People browsing my site should be able to fill up a form and submit. If it doesn't allow to upload file without signing in, how would a guest submit form? Could anyone help me on this? Appreceiate if there's any workaround for this. Thanks

 

--Rashed

thumbnail
Russell Bohl, modified 3 Years ago.

RE: Liferay Forms Upload file without signing in

Expert Posts: 289 Join Date: 2/13/13 Recent Posts

Well, out of the box on 7.2 and 7.3 Guests (unauthenticated Users) cannot use the upload field: There's an uopdate to the Form Fields Reference documentation clarifying this, and I'm sorry it's not published yet, but it says

Guest Users cannot access or upload files. Avoid using this field unless only authenticated Users can access the form.

However, this is something the Forms team knows is desirable, so it's being implemented in 7.4, with possible backport to 7.3. See https://issues.liferay.com/browse/LPS-123369 for a description of how it will work. I suppose you could follow the trail of tickets to the one that implemented the behavior and look at the corresponding commits in the git repo, if you want to make your own upload field with Gues uploads allowed.