Project with Google Drive API? Is it doable? - google-drive-api

I've been thinking about a project I'd like to start using the Google Drive API. My idea was to make a webpage (using Laravel) to let guests download files. I'd have 3 different types of users: the guests, that would be able to download files, the logged in users, that would be able to upload files, and the admins, which would be able to do all of that plus delete files (these files would be PDFs only).
Also, the server it would run on wouldn't have a lot of hard drive space for storing the files, it would just host the page and maybe keep some of the most important files. But the thing is, I have no experience whatsoever with this API. And I would hate to go through all of this trouble just to discover that it can't be done. I've tried reading the documentation but I still don't know if this is doable, and I can't find reliable tutorials (also, I don't know what is reliable, I've never worked with it).
So, for anyone who has already done something with the API, is this doable? Will the download speeds be too slow? Will users without accounts be able to download? Also, do you know any tutorials that are reliable and do it the right way? Or is the documentation the only thing I'll find/need?
Thanks in advance.

Yes,
All three cases can be handled with google drive sdk. You need to explore API in depth. Creation and downloads are easy and upload is tricky.
I recently used google drive api in a chrome extension that uploads images directly to drive here
You can ask questions regarding api usages here.

To start with, I would suggest going through one of the given Quickstarts in Google Drive REST API Overview.
Secondly, please note of the Requirements and Best Practices that a Drive API integration must adopt.
As mentioned:
Requirements
Following an "open with" action, applications must check that the user is authorized to read/write the document to which the passed document ID refers.
Best practices
In the "create new" flow, Google Drive provides your application with an authorization code. This code should be upgraded to an access token as soon as possible before applications take other actions.
Lastly, this SO post - Good tutorial on Google Drive SDK and OAuth might also help.

Related

Google drive OR Google cloud storage for a business web app

I'm a voice-over artist. I am creating a web app in which the client can make orders & upload video/sound/image/text files, I download these files to edit them then i upload the edited files & allow the client to download them.
Which is better for this purpose?
Taking in consideration
I want to allow the client to preview the edited file (video) in the
browser
Security
File privacy [I mean no one can reach the file except the client who made the order]
Performance
Price
There is no definitive answer to your question.
It confuses many customers that two, such seemingly functionally similar services, are available.
That said -- generally -- for applications where a service (your web app) is the intermediary, Google Cloud Storage (GCS) is the more appropriate solution.
GCS is a lower-level service than Drive and so you'll have a little more work to do to integrate it but it provides richer functionality too particularly with regards authorization and being able to provide more specificity about who can do what. Lastly, GCS enables so-called "Signed URLs" that would e.g. permit you to provide your customers with a secure and time-bound URL where they may upload content.
One possibly determining feature is that a Google Drive account is oriented around an individual (generally human) user (e.g. you) and your Google Drive does not permit other users to upload files; only you can create files in your Drive account although you can then share these with others.
I hope this helps you decide which service is best-suited to your needs. GCS is a very widely used service and is well-documented. You should be able to find plenty of guidance to help you develop a solution using it.

It is in regards to an email from google about migrating discontinued documents list API

I received this email and due to my lack of experience in google drive, I am unsure of how to go about troubleshooting this.
Google
IMPORTANT: Steps to migrate from discontinued Documents List API
Hello administrators,
We recently posted a reminder that Documents List API will be discontinued on April 20, 2015. This change means that service calls for this API will no longer be supported, and any Google Apps features that are implemented using this API will no longer function.
Our records indicate that you may have an application that uses Documents List API, and we recommend that you migrate to Drive API, which has comparable functionality, as soon as possible.
Here's what you need to do:
Determine if you have an application that makes requests to these types of URLs:
(took out urls since this format did not allow me to send more than two)
Migrate the applications to Drive API.
If you have questions about migration, please contact Google Apps for Work Support.
Sincerely,
The Google Apps for Work Team
How do I determine, which, if any, docs are going to cease to function post 4/20? Is there a way to organize my current list of docs (I have many) to see how many I need to pay attention to? In terms of migrating, is there a migrating tool available online?
From what I have read, I feel like this doesn't even pertain to my current drive. My understanding is that this is for developers not casual users such as myself. Am I wrong in that assumption?
Thank you for all your help in this matter. If I am not explaining everything to the level you need, please let me know. I am just confused by the email and want to make sure I stay ahead of this.
Best,
Nathan
The key part of the email is Our records indicate that you may have an application that uses Documents List API
If you have such an app (you should know since by implication, you wrote it), then you have a lot of work to do over the next two weeks. If you don't, then relax. Your documents are not affected by this announcement, only the app that Google thinks you once wrote.
It's possible it's referring to an app you have installed, in which case there is nothing you can do other than hope the developer has a new version.
In my case Google Apps Sync for Microsoft Outlook and Google Drive Windows seem to be the 2 applications that are requesting access to these depecrated scopes ... Come on Google, spread the word internally !

Accessing OneDrive as a StorageFolder from the local storage

I have been developing one Windows Store app for Win 8.1. Is there a way to access the user's OneDrive which is already synced on the hard drive? I need to access it as a StorageFolder. Similarly to KnownFolders and all the libraries. The reason behind that is that I am doing something like a gallery app that displays thumbnails of videos and pictures. When the users decides the app shows the media in full size and if it is a video, it is played. The app counts on the fact that OneDrive automatically syncs all the data, so it does need to be retrieved via the Live SDK API. If I use REST, it will be just too slow. Do you know if there is a way to achieve the mentioned approach effectively or maybe some alternative?
I have been researching extensively, but with no avail.
Thank you!
All the best,
Rosko
As Nate mentioned, you gain access to the folder through the FolderPicker API. There's no direct way to obtain the StorageFolder for that location.
Once you get that StorageFolder and enumerate contents, the extra piece you want to know about is the StorageFile.isAvailable API, as well as StorageFile.getThumbnailAsync/getScaledImageAsThumbnailAsync. The isAvailable flag is what tells you whether a file has actually been downloaded/synced, because the user might have indicated "online only" for any files.
I write about this a bit in Chapter 11 of my free ebook Programming Windows Store Apps with HTML, CSS, and JavaScript, 2nd Edition (page 575, pages 593-597), including a table about how OneDrive availability works with metered networks. This includes using thumbnails.
There's also a talk from //build 2013 on this, "What New in Working with Files" by Marc Wautier, http://channel9.msdn.com/events/Build/2013/2-119. Should answer your OneDrive questions.

Google Drive Public Links Concurrent Limits

I have been using Google Drive files shared with "View Everybody with Links" to store images that are included in transactional emails (like header images, etc).
I get the links using the SDK, and my links look like:
https://docs.google.com/uc?export=download&id={somefileId}.
This is basically the technique from Displaying files (e.g. images) stored in Google Drive on a website.
This works... most of the time.
Sometimes I get reports of users not being able to download the images. I cannot figure it out what is going on, but I believe it is that there is a limit on how many concurrent or maybe accumulative requests can be done on a given link and/or user account.
I am looking for documentation that confirms this. My specific question is: does anybody know the quota limits imposed by Google Drive? (if you have a link to official information it would be great).
Thanks.
Same problem for me,
It seems Google drive has limits when sharing files,
I hope this link will be useful,
https://support.google.com/drive/answer/2494827?hl=en
The help does not indicate whether the limits are daily, always ....
Regards

An alternative to app engine to use drive api?

I basically want to write an app that uses the Drive API. developers.google.com has tutorials on how to do that. But problem is that their example asks me to first create an app engine instance, which I don't want to, as I've heard pretty bad reviews about it. So, I just wanted to know whether there is/are any alternative/s available, and what challenges I would possibly have to face when using the service/s.
You can write a Drive app on any platform that can make an HTTPS request, so pretty much, any platform. When you choose one, if you have any problems, get back to us.
Also, you should probably try out App Engine before making a decision based on "reviews you read".
AppEngine has a few convenience classes around Credential storage and User Id. Aside from that a standard servlet app and a GAE app are pretty much the same.