yes, button can trigger a google script to do that
I must hang out for a while. Iāll talk later. Thanks, Uzo.
Try this demo, it uploading directly to my Google drive, and displays in Glide as a image element or inline list, PDF, jpeg. gif or png
It turned out that my initial guess was right, you were using Html and app scripts. Iāve tried it before, with a form like a form with an open link button. Iāll probably try again with the webview component.
You havenāt slept, bro?
This is what I got from the internet before.
I feel like we got way off topic here.
So you still have the issue with the HTML display? Based on an earlier post, I thought you had figured that out, so it wasnāt an issue for you anymore. I still had the issue myself, so I used a different url structure with the same file ID.
Iām usually the one adding the links to the PDFās, so if one url doesnāt work, then I try a different one. I donāt have a fully automatic process to handle the url structure. All Iām doing is wrapping whatever url I getā¦whether the user manually entered the url to an external location, or it was uploaded to glides storage.
However, if you are asking how to handle switching from a /file/d
url structure to a /uc?id=
url structure, then all you need is a template column to replace that part of the url.
- First obtain the url for the location of the pdf
- Create a template column that uses that url as the template source, and then create a replacement to replace
/file/d
with/uc?id=
. This should really only change urls that come from google drive. Nothing will be replaced in any of the other url structures are used, or the file is not being stored in google drive. - Create any other replacements in that template column as needed.
- Finally create another template column to wrap that updated url with the google doc viewer.
Yeah, Iāve done it with a regex to extract and a template columns.
I think there is still a way to solve 3 different URL structures because of your previous statement. This means that the user must upload / share a homogeneous URL.
Thank you. Nice to discuss with you.
And there was a discussion that was a little off topic, just to comfort Uzo who was having trouble sleeping .
@Jeff_Hager, as additional info: I just opened a file with a size of 28.4MB, it turns out that Google Doc viewer does not allow preview because the file size is too large. But if you use ā/previewā itās still smooth. Thanks.
Good to know. Thanks for the heads up!
I havenāt tried it before, but looking at there demo site, it appears that the code thatās generated uses javascript which isnāt allowed directly in glide. So Iām not sure if you could directly embed into glide using the code thatās generated from their demo site. Plus when I tried, I got the ācould not embedā message. You could possibly create your own separate website that uses adobeās embed code, but then itās probably not as dynamic as you would want it to be as if it were within glide. Iām not seeing how adobeās viewer could effectively be used in a glide app.
Yeah, I gave up too.
Do thisā¦ Upload your pdfs to a folder in drive and set the folder to public
Get the File Cabinet Extension from Awesome Table - create a new sheet in that folder
In that sheet run the extension on that folder and you will get a list of files - Add a column for book cover and just add the thumbnails as the coverā¦
Nowā¦wrap your app around that sheet and now add a glide column called DocsTemplate and in that template column type
https://docs.google.com/viewer?embedded=true&url={document}
substitute {document} with the URL of file inside drive
example I made this wayā¦ the Works of Kierkegaard
hope this helpsā¦
Hi, @Blue_Community, thanks for sharing.
Lastly, I prefer to use URLs that end in āpreviewā, a URL structure that is already provided by Google and works well.