Hi, I have (Glide pages / glide table) a table with first column the URL of an uploaded file.
In the layout-options of the file-picker, I checked “Keep file name when uploading”.
So far so good.
But in another screen, I want to display (in a collection) all the uploaded files, but then I do not have a similar option. I can only show the whole URL.
I think I need a second column in my table (get part of url) to retrieve only the filename, but I do not know how.
You can use the Javascript column to extract the file name using this code:
var segments = p1.split('/');
// Get the last segment
var lastSegment = segments[segments.length - 1];
// Split the last segment by question mark or hash, if present
var fileName = lastSegment.split(/[?#]/)[0];
// Return the file name
return fileName;
I believe it gives you escape characters in some cases.
var segments = p1.split('/');
// Get the last segment
var lastSegment = segments[segments.length - 1];
// Split the last segment by question mark or hash, if present
var fileName = lastSegment.split(/[?#]/)[0];
// Decode URL-encoded characters
var decodedFileName = decodeURIComponent(fileName);
// Return the decoded file name
return decodedFileName;
var segments = p1.split('/');
// Get the last segment
var lastSegment = segments[segments.length - 1];
// Split the last segment by question mark or hash, if present
var fileName = lastSegment.split(/[?#]/)[0];
// Split the file name by dot (.) and retrieve the last element as the extension
var fileExtension = fileName.split('.').pop();
// Return the file extension
return fileExtension;
You mean the file created date? I guess it’s not possible. I checked a bit and we can get the modified date with js but couldn’t get the created date. If you want the added date you can use a date column and update that column when uploading the file!