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?

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.

2 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