I would like to use Google Sites to create a web site, where users can upload files. These uploaded files are stored at Google Drive, and data about the file is stored in a Google spreadsheet.

Are there any open-source applications or tutorials or libraries which can help make this possible? If not, can anybody explain how to do this?

  • Try Google Apps Script for that. See also Chrome Web Store for GAS apps.
    – Jacob Jan
    May 9, 2013 at 13:20

2 Answers 2


Maybe JotForm is a solution -> http://www.jotform.com/blog/62-Send-Your-Form-Uploads-to-Google-Drive

  • 1
    Hi, perhaps you can put a snippet of the answer here so that this answer can stay valid when the link becomes dead? Thanks!
    – Hydra
    May 15, 2013 at 0:43

Try this code in a web app script. This code generate a Submit button and then ask for a file that the user can upload directly to a preconfigured folder of Google Drive.

var app = UiApp.createApplication();
function doGet() {

  var formContent = app.createVerticalPanel();
  formContent.add(app.createSubmitButton("Start Upload"));
  var form = app.createFormPanel();

  return app;

function doPost(e){
  var DSRload = e.parameter.DSRfile;
  var folders = DriveApp.getFolders();
    var folder = folders.next();
    if(folder.getName() === 'Expedientes'){
      var Doc = DriveApp.createFile(DSRload).getId();
      var file = DriveApp.getFileById(Doc);

  // Display a confirmation Message
  var label = app.createLabel("File Upload Successful");
  var clickHandler = app.createServerHandler('close');
  app.add(label).add(app.createButton('close this window', clickHandler));
  Logger.log('Va a cerrar 1');
 // return app ?;OJO con esta linea activa, muestra error

function close(){
  //OJO No entra a esta función
  Logger.log('Va a cerrar 2');
  //return UiApp.getActiveApplication().close();
  return app.close();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.