I have a bunch of html files in my drive and I want to be able to preview them without downloading them to local. I also don't want to create a public folder and store them there. Basically I want the files to be only visible to me and to people whom I share with. Is it possible?
I don't have to necessarily view the pages in the drive.google.com, it's ok to be a url which has to be accessed outside of drive.google.com, and I can bookmark that url to visit the html files and send the link to authorized people.
I came across this solution in SO but it suggests to create a public folder.
opening html from google drive
Related
hi i am working on project in which requirement is i have to upload images on some cloud services like google drive or other, and it generates a URL of images like http://example.com/images/1.jpg etc and share this URL with any one.
I already tried this method (but it not fulfill my requirement) :
How do I display images from Google Drive on a website?
If you have some image files, just upload them to a public folder on
your Google Drive, copy its folder ID from the address bar (e.g.
0B0Gi4v5omoZUVXhCT2kta1l0ZG8) and paste it into a form at GDrives,
then choose your own alias (e.g. myimgs) and voila! You can access the
images one by one using e.g.
http://gdriv.es/myimgs/myimage.jpg
If you want to embed a whole folder on your website (in a frame), you can use one of the following URLs, replacing [folderID] with your
own ID:
http://gdriv.es/myimgs/
https://docs.google.com/folder/d/[folderID]/preview?rm=minimal
https://drive.google.com/folderview?id=[folderID]
If you prefer to get the file list in XML or JSON, you can use YQL.
Note: You can use Google+ Photos to host ans embed your images as well.
I am building a simple public website that will allow users to search and view various PDF files. I plan to store the PDF files on a public folder in my Google Drive. The link to my test folder is:
https://drive.google.com/open?id=1pBTWzuElA-gSLPvQAHlnonamfon6V1NW
In this folder there are 2 PDF files - File1.PDF and File2.PDF
I would like to be able to link to these from an HTML page but have no idea how to do it - I have searched this forum but with no luck so far - the closest I have found is how to download files from gdrive via a local program rather than a public website
Drive has its own api that you could use here
Hope this help
I don't know if this is possible, but I would like to save some data of my website, like images and documents in a cloud like dropbox or google drive and I want that these data are available and visible to someone looking my site.
is it possible? (My intention is to continue storing the html,js etc data on the server)
You can do that with Dropbox or Google Drive.
For Dropbox, put your all images to a folder and make this folder public. Then, right click the image or js file and select the copy public link. You can use this link for your images or js files.
I'm trying to integrate Dropbox into my web application in the following way:
Users can enter a Dropbox Share Link, i.e. a Dropbox folder that can be accessed by anyone, even without a dropbox account.
My application then grabs the images from the folder and displays them to all users of my application.
Now as far as I can tell, the Dropbox API doesn't allow this without sending the user through a full-blown OAuth process. But since the shared link is public anyway, I don't need (and don't want) access to the users Dropbox account.
Is there a way to access a shared link in a programmatic way (without parsing the DOM or similar hacks)? Maybe there is a query parameter on the shared link to retrieve the contents as JSON? If it exists, I didn't find any docs about it.
Surely I'm not the first one to try this, so please share your solutions!
No, there's no programmatic way to list folder contents from a share link. If you have a share link for a specific file, then you can convert the domain from www.dropbox.com to dl.dropboxusercontent.com, but this trick doesn't work on folders.
I have a collection of PDF files on a Google Drive. I have shared them and I want to be able to link to them from a list on a web site. What I'd like to be able to do is work out the file name of the PDF using information in the list. As a simple example, if my list contains items 1, 2 and 3 I'd like to be able to upload PDF files 1.PDF 2.PDF and 3.PDF to Google Drive then have the web site just link to those when a link is clicked and show the PDF files in the browser.
So, I guess I could do this just by uploading the PDF to Google Drive and manually adding a link to PDF on the web site. However, what I want to do is generate the link programmatically so that when I have, say, 50 PDF files I don't have to keep getting the link from Google Drive and adding it to the web site. The site should just work out that item 50, say, in the list will link to 50.PDF, for example.
I've tried to get the file id using the API but that requires the authorization token to be generated and manual intervention to take place, so that won't work. At least, not at the point where the file is viewed because the viewer is anonymous.
So my questions are:
Is it possible to work out what a file name will be on the drive using just something like an item number in a list?
I guess that there are maybe some other options - for example, when I add the items to the list on the web site programmatically, I could go and locate the google drive file manually using a web application and link it using the file id at that point. I could store the ID in a database - however, would any anonymous user then be able to just click on the file link on the web site and view the file?
Finally, can anyone think of another way to do this?
Any help would be appreciated! :)
Is it possible for you to use a service account? You can authorize the app with an account dedicated to your app and user doesn't need to authorize and authenticate. The files you will be uploading will be managed under the service account's Drive.
You can learn more about service accounts on https://developers.google.com/accounts/docs/OAuth2ServiceAccount
If you have implementation specific questions, please ask.