Page MenuHomePhabricator
Authored By
epriestley
Oct 22 2013, 3:20 AM
Size
668 B
Referenced Files
None
Subscribers
None

gscript.gs

function showAlert() {
var app = UiApp.createApplication();
app.setTitle("Upload File");
var form = app.createFormPanel();
app.add(form);
var content = app.createVerticalPanel();
form.add(content);
content.add(app.createFileUpload().setName('thefile'));
content.add(app.createSubmitButton("Upload File"));
var ui = DocumentApp.getUi();
ui.showDialog(app);
}
function doPost(eventInfo) {
var app = UiApp.getActiveApplication();
var doc = DocsList.createFile(eventInfo.parameter.thefile);
var content = doc.getContentAsString();
// DO AJAX STUFF
// Optionally, this closes the dialog.
app.close();
return app;
}

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/so/64/i5fyf6hgskipjxd5
Default Alt Text
gscript.gs (668 B)

Event Timeline