Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P959
gscript.gs
Active
Public
Actions
Authored by
epriestley
on Oct 22 2013, 3:20 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Flag For Later
Award Token
Tags
None
Referenced Files
F73145: gscript.gs
Oct 22 2013, 3:20 AM
2013-10-22 03:20:54 (UTC+0)
Subscribers
None
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;
}
Event Timeline
epriestley
edited the content of this paste.
(Show Details)
Oct 22 2013, 3:20 AM
2013-10-22 03:20:54 (UTC+0)
epriestley
changed the title of this paste from untitled to
gscript.gs
.
epriestley
updated the paste's language from
autodetect
to
autodetect
.
epriestley
changed the visibility from "All Users" to "Public (No Login Required)".
Log In to Comment