function doGet(e) {
var ss = SpreadsheetApp.getActive(1YsG5LJb5mkFP3w1k0-WVv-kQ7rAvS9o-16zKuyUbBlLUX5D-foYn0lzl);
var sheet = ss.getActiveSheet();
sheet.clear();
sheet.appendRow( ['Filename', 'FileType', 'FileID', 'ViewUrl'] );
var folderId = '1EjhZxyuFy_edited_wkS--QdpauABaMpU';
var folder = DriveApp.getFolderById(folderId);
var contents = folder.getFiles();
var file, name, id, url, type;
while(contents.hasNext()) {
file = contents.next();
name = file.getName();
id = file.getId();
url = "https://lh3.googleusercontent.com/d/" +file.getId();
type = niceFileType(file.getMimeType());
sheet.appendRow( [name,type,id,url] );
}
SpreadsheetApp.flush();
rng = sheet.getDataRange().getValues();
return ContentService.createTextOutput(JSON.stringify(rng));
}
My believe that the code is due to the spreadsheet save file from the AppsScript because I found a save file for this script and place it where I saw it on the source.
Your code did work but no spreadsheet connected to it and it said the same error message
Could you please tell me if I wrote the code correctly because I know that I copied the save file of the spreadsheet and pasted it where it went in the sources you provided me
I'm just thinking out of curiosity instead of doing google sheet could we just do a folder for the companion like the app gives you the folder in Google drive to use and you put your own files into it
I'm sorry for not telling you but the goal is to give each user like an attachment folder that is different than any other user to put their own files in them so that I cannot see what the user's pictures are.
I'm just going to tell you but I don't want to see other users'picture ideas.
In which case, based upon what you have said, there would be no issue in creating a local folder on the device for each user, perhaps /Pictures/YourApp in Shared Storage.