Class FileUpload


Deprecated. The UI service was deprecated on December 11, 2014. To create user interfaces, use the HTML service instead.

A widget that wraps the HTML <input type='file'> element. This widget must be used within a FormPanel.

The result of a FileUpload is a "Blob" which can we used in various other functions. Below is an example of how to use FileUpload.

function doGet(e) {

var app = UiApp.createApplication().setTitle("Upload CSV to Sheet");
  var formContent = app.createVerticalPanel();
  var form = app.createFormPanel();
  return app;

function doPost(e) {
  // data returned is a blob for FileUpload widget
  var fileBlob = e.parameter.thefile;
  var doc = DocsList.createFile(fileBlob);

Internally, UiApp widgets are built on top of the Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation directly. You can find the FileUpload documentation here.

Deprecated methods

Send tilbakemelding om ...

Trenger du hjelp? Gå til brukerstøttesiden vår.