Skip Navigation

[Resolved] preview upload image from post or user form

This support ticket is created 3 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 11 replies, has 3 voices.

Last updated by Jamal 3 years, 5 months ago.

Assisted by: Jamal.

Author
Posts
#1821249
Screenshot 2020-10-22 at 10.41.30 PM.png

Dear Sir/Madam,

I want to preview the image without enabling the "Use the WordPress Media Library manager for image, video, audio, or file fields" from post or user form.

From this Toolset support, it can preview the image after upload but why not Toolset plugins can do the same? It is very useful to let user to preview the image they selected.

Is it possible to do?

Best regards,

Kelvin.

#1822465

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi Kelvin

This support forum uses the bbPress forum software, it doesn't use Toolset Forms.

I'm afraid if you are not using the WP media upload library for image uploads then no preview is available, as the image file doesn't get uploaded until the form itself is submitted in that case.

#1822663

Dear Nigel,

Got it, if I use the WP media, I worry that the guest will see others' upload images as all user do the registration and upload the image. If I two new users do the registration and upload the image but not yet submit, will they see each other image on the WP media?

Best regards,

Kelvin.

#1823233

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Kelvin,

If you are using Toolset Access, and managing your form with it, the default setting will allow users to see only their media files, unless you want to use a different configuration. Check this screenshot hidden link

If you are not using Toolset Access, you can use the custom code in this old reply https://toolset.com/forums/topic/restrict-editor-role-to-view-own-media-only-in-media-library-on-uploadinsert/#post-33428

I hope this helps. Let us know what you will get.

#1823677

Dear Jamal,

Thanks for your reply, does it mean both you and I can see each other media if we register it because we both a guest role?

Best regards,

Kelvin

#1824027

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Guest is not actually a role for users. It describes the not logged in users. Any not logged in user is considered a guest.

The custom code will ensure that any logged-in user who is not an admin will only see the images that he has uploaded. Guest users won't see any images at all. They will need to upload the images, but they can't because of WordPress restrictions. So, to let guest users upload images, you will need to use Toolset Access.

#1824241
Screenshot 2020-10-26 at 10.02.27 AM.png
Screenshot 2020-10-26 at 10.02.18 AM.png
Screenshot 2020-10-26 at 9.58.30 AM.png

Dear Jamal

Do you mean guest can't do the image preview even I enable the "Use the WordPress Media Library manager for image, video, audio, or file fields" from post or user form?

I have no idea how I can use Toolset Access, I can't enable the Preview Any for Guest under the Media.

I found the image upload appearance is different from [cred_field] and [cred_generic_field], how can I make them the same look?

I have two questions above.

Best regards,

Kelvin.

#1826017

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Kelvin,

I am sorry for mistakenly telling you that guest users can be able to use the Native Media Library to upload and preview images. It turns out that they can't. I confirmed this with the team.
If the user is not logged in, the Native Media Library can't be used. So, there is no way to allow guests to preview their images.
https://toolset.com/course-lesson/using-the-native-wordpress-media-manager-in-front-end-forms/#default-user-permissions-for-using-and-editing-existing-files

My apologies for the mistake.

#1830381

Dear Jamal,

Thanks for your update. Just a bit don't understand so many years still not yet launch the drag and drop upload, I am sure this request has been made several years from different member. Is there any ETA?

#1830451

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Unfortunately, we do not have an ETA for it.

Please note that we can't implement drag/drop upload for guest users because of WordPress limitations.

#1830593

Dear Jamal,

Understand, how about the drag/drop function for loggin user?

#1830633

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

The Native Media Library should work for logged in users. Toolset Access should let you display to each user only the images he uploaded.
If you don't use Toolset Access, you will need to use the custom code in this ticket https://toolset.com/forums/topic/restrict-editor-role-to-view-own-media-only-in-media-library-on-uploadinsert/#post-33428

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.