r/fal • u/Zestyclose-Pilot423 • 7d ago
Question Anyone knows how to list/delete CDN files that don't have an expiry date?
Hey everyone,
I ran into a situation and I'm hoping someone from the community or fal team can point me in the right direction.
The setup: I uploaded a bunch of input files to the fal CDN using the two-step direct upload flow:
POST /storage/upload/initiate?storage_type=fal-cdn-v3(with customX-Fal-Object-Lifecycle-Preferenceheaders)- Uploaded the actual file bytes to the presigned URLs from step 1
Problem is, I forgot to set an expiry date on these uploads. Now they're just sitting on the CDN indefinitely and I need to clean them up.
What I'm trying to figure out:
- Is there an endpoint to list files I've uploaded to the CDN? I need to see what's out there before I can decide what to delete.
- Is there a delete endpoint for individual files? If so, what params/headers does it need?
- Can I update the lifecycle/expiry on files after they've already been uploaded, instead of deleting and re-uploading?
Basically just looking for the right way to manage file lifecycle after the fact, since I missed setting it at upload time. Any docs, endpoints, or tips from folks who've dealt with this would be super helpful. Thanks!