Probably this can be done with a public app. I imagine having a user-specific field for entering password and a template + relation combination to check if the entered email + password is existing in the data.
You can have two fixed time column in the Sheet, let’s say it contains 09:00 and 17:00, then a math column inside Glide with the format set to time only. Show the image picker only when the “now” time is after 09:00 and before 17:00.
Use the same strategy above, don’t show the password field when it’s outside of office hours.
You would need a script to do this, and make sure you catch the timestamp when users upload an image, via a form.
You could actually just use the now function in a cell and format it for time. Then glide did a visibility for the action that will not show the button to add pictures or files if that number is greater or less than.
You would need a script for sure to delete the files but I guess the question is does it need to be 24 hours or just at the end of the day.
Ok, so here’s a script that should work to remove after they are a day old, just change sheet name and column reference.
function ClearAfter24() {
var ssActive = SpreadsheetApp.getActiveSpreadsheet();
SpreadsheetApp.setActiveSheet(getSheetByName('Sheet1'))
var MyRange = ssActive.getRange("A:A");//selects column A
var ADayAgo = new Date(date.getTime()-(24*3600*1000));
for(i = 0; i < MyRange.length; i++) {
if(MyRange[i].getTime()<ADayAgo){
getActiveSheet().deleteRow(i);
}
}
}
Something else to note, you can just add a multiplier to the beginning of the time identifier to change the day count, a example of this would be if you wanted it to be a week instead of a day the 5th line would simply read:
var ADayAgo = new Date(date.getTime()-7*(24*3600*1000));