joystick icon indicating copy to clipboard operation
joystick copied to clipboard

For uploads, have a URL sanitizer for third-parties

Open rglover opened this issue 2 years ago • 0 comments

This is always a pain. When you upload stuff to S3 for example, you get back a full URL for the object. Later, if you want to delete the object, you have to have the exact path within the bucket, sans the base bucket URL.

It'd be helpful if we could auto-sanitize the bucket URL with a function like uploads.getFilePathFromURL(), pass in something like this https://cheatcode-documentation-logos.s3.us-east-2.amazonaws.com/Gz3xSuFgOaq22uV7/logo-transparent.png and get back Gz3xSuFgOaq22uV7/logo-transparent.png.

rglover avatar Jan 09 '23 15:01 rglover