Foren

Upload images to Image Gallery as Guest user

Kristof Verbraeken, geändert vor 13 Jahren.

Upload images to Image Gallery as Guest user

New Member Beiträge: 21 Beitrittsdatum: 17.07.08 Neueste Beiträge
Hello,

I would like to add a file upload field to a form to upload an image.

The form is just a contact form on a public website.

I would like to use the Image Gallery to store the uploaded images.

So, in terms of Liferay: I want the Guest user to be able to upload images to the Liferay Image Gallery.

I already modified the permissions of the Image Gallery portlet (working with resource-actions/default-ext.xml and resource-actions/imagegallery.xml in the Extension Environment), so that the Guest user is able to upload image to the Image Gallery (ADD_IMAGE). I already put this ADD_IMAGE permission on the correct folder for the Guest user.

This is all so simple, clear and easy, yet still I just can't upload any image to the Image Gallery as the Guest user. I already tried several things: completely redeploy Liferay, work with a completely clean database from scratch, but none of these things change something to my problem.

If any of you wanted image upload ability in a custom portlet for Liferay for every kind of user, how would you fill in that requirement? I just wanted to use the Image Gallery for that, because it's already there in Liferay and easy to manage images from the Control Panel. I just thought it was time saving, because then I didn't need to develop a backend etc.

Can anyone help me with this - probably permission - problem or think of an easy image upload alternative in Liferay?

Thanks in advance for any help!

Kind regards,
Kristof
thumbnail
Gaurang Sheladia, geändert vor 13 Jahren.

RE: Upload images to Image Gallery as Guest user

Regular Member Beiträge: 159 Beitrittsdatum: 15.02.09 Neueste Beiträge
Hi Kristof,

Yes, the issue is already there in Image Gallery portlet for Image Uploading Using Guest Role.

In UI side may be you can achieve though the code but if you are using modern file uploader then it will use upload.js for uploading the file and in that it will checking the permission for user. So if its guest user than it will not allow for upload any image in image gallery.

Please let me know for any concern/queries.

Regards,
Gaurang