pingdotgg/uploadthing

[Bug]: `UTApi` is deleting the file but still able to directly access the file from its URL.

Closed this issue · 5 comments

What happened?

I am using UTApi to delete my uploaded images. The images are deleted successfully and no longer appear in the dashboard. However, I can still directly access the deleted file from its previously stored URL.

It also frees up space for my free tier. 🙂

What did you expect to happen?

The file should not be accessible via its URL after deletion.

Version

Using
"@uploadthing/react": "^6.7.2",
"uploadthing": "^6.13.2"

Reproduction Steps

Just follow your docs

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

@Abdullahiqbal2021 can you share your appId and an example of an affected file key ? I have not been able to reproduce this behavior on my end.

@markflorkowski this is the repo i am working on and created a simple page to recreate issue.
My UPLOADTHING_APP_ID is

2bf2bglzre

and affected file is

#key
ac0595d4-1ff4-48ac-946a-bf45a964b007-bjnd11.png

#URL
https://utfs.io/f/ac0595d4-1ff4-48ac-946a-bf45a964b007-bjnd11.png

I am currently using Chrome. I thought it was some cache issue but i open the image link in firefox and was able to access the image.

The image seems to be deleted as it does not appear in dashboard any more but we can access it directly from its stored url.

@markflorkowski I just access the above URL and file is not accessible. I think it take some time to delete the file but the file disappears from the dashboard immediately.

I think it take some time to delete the file but the file disappears from the dashboard immediately.

Yes, this is correct. We optimistically remove it from the dashboard, but in reality it can take probably up to 30 seconds for the file to actually be fully removed.

I think it take some time to delete the file but the file disappears from the dashboard immediately.

Yes, this is correct. We optimistically remove it from the dashboard, but in reality it can take probably up to 30 seconds for the file to actually be fully removed.

Thanks 👍