puter.fs.getReadURL()Generates a URL that can be used to read a file.
puter.fs.getReadURL(path)
puter.fs.getReadURL(path, expiresIn)
path (String) (Required)
The path to the file to read.
expiresIn (String | Number) (Optional)
How long the URL stays valid, in jsonwebtoken duration format: a string like '24h', '30d', or '1h' (units: s, m, h, d, w, y), or a number of seconds. If not provided, defaults to '24h'.
A promise that resolves to a URL string that can be used to read the file.
const url = await puter.fs.getReadURL("~/myfile.txt");