How to display uploaded pdf file

Hi! I tried uploading a pdf file from the image picker and it didn’t work, so I changed the component to file picker. The only problem is now I can’t display that pdf with the image component I had set up.

How can I display the uploaded file to the user?

1 Like

I know there are various hacks in Glide to show PDFs. If you want a surefire way, there’s this hack, too:

1 Like

Oh, nice. Didn’t realize you’d already addressed this topic. Thanks @Robert_Petitto :+1:

1 Like

The only thing is, if I use the Cloudinary route, users would no longer be able to upload them… I’d have to upload them myself, right?

It might be that users would upload PDFs to the app using filepicker but then you use cloudinary to fetch the item and view it as an image…let me test :crazy_face:

haha ok. Thanks! :grinning:

Your original method should work. Use File upload to upload PDF and use an image component to display the file.

3 Likes

Oh, maybe I was doing something wrong. Let me check again real quick.

You were right, it does work. I had an issue with a visibility rule that I hadn’t tested properly.

Thanks again for your time! :+1:

1 Like

Hi, was this solved?

Is there filetype for pdfs in Glide? The approach of using file picker for letting customers upload pdfs and then using image column to showcase that file does not work for the pdf files of more than 1 page.

I am facing this challenge. What is the best way to make it work?

Have you tried using the web embed component?

Not yet. Let me learn about it and try. Thanks for your response, @ThinhDinh!

1 Like