Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last modified timestamp changes before the file is updated #627

Open
BashkirovN opened this issue Jan 27, 2025 · 1 comment
Open

Last modified timestamp changes before the file is updated #627

BashkirovN opened this issue Jan 27, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@BashkirovN
Copy link

Bug report

Describe the bug

Backstory: In my app, the user has to put a closing signature on a contract that is already in the storage. The contract is then uploaded to the storage again overwriting the previous version, and an email with the signed contract is emailed to the customer.

To ensure the contract was updated before being emailed, I tried to poll the Last modified timestamp until it changed. This however led to inconsistent results of the contract sometimes being delivered unsigned (original version before overwriting).

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

(Sorry, no code as I changed the app to implement a workaround.)

  1. Save the Last modified timestamp
  2. Overwrite the file
  3. Check if the Last modified timestamp has changed
  4. Download the file

Expected behavior

The downloaded file must be of the latest version

System information

  • Version of supabase-js: 2.45.4
  • Version of Node.js: 22.x (Vercel)
@BashkirovN BashkirovN added the bug Something isn't working label Jan 27, 2025
@ajitsinghkaler
Copy link
Contributor

You can use supabase webhooks they are much better for these instances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants