Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F73145
gscript.gs
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
epriestley
Oct 22 2013, 3:20 AM
2013-10-22 03:20:54 (UTC+0)
Size
668 B
Referenced Files
None
Subscribers
None
gscript.gs
View Options
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
Details
Attached
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)
Attached To
Mode
P959 gscript.gs
Attached
Detach File
Event Timeline
Log In to Comment