Excellent bro. You are the only person who insist the people became developers. Hand of you sir. I pray to God to bless you became good health and wealth as your expecting way. 👌👌👌👌
Curt, your videos are great to learn from thank you so much. Somewhat related question, do you have a video on how to display a PDF file in Google Web App, the file that is on a Google Drive that is. I'm having issues finding anyone posting videos like that.
Kudo's brother, very nice... works like a charm. We are having a wedding for my daughter, and asking everyone to use their phones to take pictures and videos... basically were crowd sourcing the photography for the wedding! So I needed a very simple and fool proof way for this multitude of people to send me their images later, without the worry of file size or hassle of logging in to something. And YOU my friend are responsible for making that happen with your very thorough tutorial - Thanks! BTW, can I insert a BOT screener in this? If yes, do you already have some code I can use, and where should it be inserted in the code? And just one more thing - how would you code a progress bar in here - having no luck at figuring that out. Best regards...MS
Hola amigo, excelente tus vídeos, haces muy bien las cosas, sigue así. 👏🏻👏🏻👏🏻👏🏻👏🏻. Cuando haces un Formulario desde cero y con ID manual, es decir que uno mismo coloque el número de ID y puedas borrar, editar, buscar. Muchas gracias por enseñarnos cada día más. 💪🏻😎👏🏻👏🏻👏🏻
Google Apps Script Code used in Video: function doGet(e) { var htmlOutput = HtmlService.createTemplateFromFile('UploadFile'); htmlOutput.message = ''; return htmlOutput.evaluate(); } function doPost(e) { Logger.log(JSON.stringify(e)); var destination_id = ''; // ID OF GOOGLE DRIVE DIRECTORY; var destination = DriveApp.getFolderById(destination_id); var data = Utilities.base64Decode(e.parameter.fileData); var blob = Utilities.newBlob(data, e.parameter.mimeType, e.parameter.fileName); destination.createFile(blob); listRecord(e.parameter.username, e.parameter.fileName); var htmlOutput = HtmlService.createTemplateFromFile('UploadFile'); htmlOutput.message = 'File Uploaded'; return htmlOutput.evaluate(); } function listRecord(username, filename) { var url = ''; //URL OF GOOGLE SHEET; var ss= SpreadsheetApp.openByUrl(url); var recordsSheet = ss.getSheetByName("Records"); recordsSheet.appendRow([username, filename, new Date()]); } function getUrl() { var url = ScriptApp.getService().getUrl(); return url; }
Hey Thanks you so much Can u please help me with a code which makes a form that has multiple files upload option & section based answering like that of google forms. Please help
Thanks for sharing. It seems to be a problem with your File Loader Web App. I want to upload a file only one time without resubmission but for some reason it kept uploading the same file every time I refresh after submission. Please let me know how to prevent it on your File Loader. Thank you
Hi Curt. Great tutorial. Question. What part of the code do I remove if I want to omit the spreadsheet part and just keep visitor uploading file and it goes to my Google drive folder. Thanks...
Thanks for such a nice video. Please guide on how to change the code instead of do post i want to run it on clicking upload files button without dopose event..
Thank you for this! I stumbled upon a problem: I tried uploading a video (more than 50mb), it just loads forever and finally it gave me a 413 error (file too large). However, when I uploaded the same video material directly to gdrive, it successfully uploaded it. Do you know any work around for this using app scripts? I'm trying to ask my clients to send a video (for a contest happening in our office) through a webapp. Hope you could help! Thanks!
I am trying to create a Google Site page for work. I need to include a way for users of the site to upload documents, much like what you show here. Is it possible for this to go into the Google Site I have created? Thank you
Hello Sir, im looking for how to get the data print in just one spesific column, so the data result not horizontal printed, but vertical include if i have new data inputed, can you help me sir?
HTML and Javascript Code used in Video: function LoadFile(event) { var file = event.target.files[0]; var reader = new FileReader(); reader.onload = function(e) { console.log(e.target.result); var fileData = e.target.result.substr(e.target.result.indexOf(",")+1); var mimeTypeStart = e.target.result.indexOf("data:") + 5; var mimeTypeEnd = e.target.result.indexOf(";"); var mimeType = e.target.result.substr(mimeTypeStart, mimeTypeEnd - mimeTypeStart); var fileName = file.name; document.getElementById("fileData").value = fileData; document.getElementById("mimeType").value = mimeType; document.getElementById("fileName").value = fileName; }; reader.readAsDataURL(file); } Web App File Loader
Sir ,I have a question . How to display a uploded file automatically in a webpage. I hope you getting me Usually when we upload a file it gets stored in a drive. But what I mean is though it's uploded on some folder on Google drive, the link must be displayed automatically in a webpage. Thankyou
I find one solution, maybe not best...? var data = Utilities.base64Decode(e.parameter.fileData); var blob = Utilities.newBlob(data, e.parameter.mimeType, e.parameter.fileName); var fileOutPh = destination.createFile(blob); var fileUrlPh = fileOutPh.getUrl();
@@AnimkomAMVMAD hmm, may this reference and source code will give you some more practical experience ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-m3Sc7nVLPP8.html
how do you protect this from malicious attackers who abuse the upload capabilities? what if someone maliciously uploads files over and over again until your drive is full..
"Chance your sheet name as Records. Or use(line 32) ss.getSheetByName("your sheet name");//sheet name given in the bottom of spreadsheet like sheet1." got this from one of the comments here, might help sm1
PLEASE HELP. URGENT. How can I implement it so that anyone can use it to upload file without the requirement of signing on to their Google Accounts? Basically I want to make it available to upload a file on my drive. I tried changing the Share Settings of the Spreadsheet and Drive Folder to 'Anyone can Edit" and Deployed the Web App as "Anyone" instead of "Only me" but still it is asking for users to the Sign-in to their Google Accounts.
Hola! cómo estan? bien tengo un gran problema y esto ha trabado mi proyecto, ya que mi base de datos es con googlesheets, ya tengo un formulario en html que envía sin problemas a mi gsheets, tengoq ue crear un form para cada cliente, mismos campos pero con diferentes items dentro de un select, o sea, opr cada hoja creada por envio del form de google debería incorporar un script único, alguien me podría ayudar a solucionar esto? llevo mucho tiempo sin poder solucionarlo. MUCHAS GRACIAS!
Please anybody tell me how to add another one input box that data will be show in Google sheets for example below the user name I added email input box how to add data automatically show in Google sheets