Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

User uploaded file to google drive via javascript?

I have a web app that I would like the user to be able to add a file from their computer and upload it to my google drive. I have the choose file button working but I'm not sure as to how the function should look to access my google drive account and send the file upon a button click.

<h4>Upload a file:</h4>
    <div class="form-group">
        <input type="file" id="fileInput" name="fileInput"/>
    </div><br>

I put this inside a infowindow and I'm able to search for and select a file from the user's computer. I really just looking for the JS function to send it to my google drive. Any help would be appreciated.

like image 504
Jacob Guthrie Avatar asked Aug 28 '15 13:08

Jacob Guthrie


1 Answers

We had the same problem - and therefore developed a web service for anonymous uploading into the website owner's Google Drive.

See https://driveuploader.com/

You can easily create a reliable upload component, which can be embedded in any website with an iframe code, similarly like YouTube - or used as a part of other applications with a basic JavaScript API with webhooks.

After you create the uploader - embedding is done with the code like:

<iframe src="https://driveuploader.com/upload/{uploader key}/embed/"></iframe>

It runs in all latest web browsers - and supports unlimited file size uploads (tested on files with hundreds of gigabytes, yes GIGABYTES).

Because the component is responsive - it is perfect also for Wordpress or Google Sites websites.

If you need only a basic page where your friends, students, colleagues can securely drop into your Google Drive some (possibly large) files, then this is offered too - and completely for free.

Disclaimer: we are developers of this service.

like image 91
MapTiler Avatar answered Sep 22 '22 11:09

MapTiler