Skip to content

feat(firestore): allow users to overwrite existing cloud files on upload#76

Open
vibhutomer wants to merge 1 commit into
seetadev:mainfrom
vibhutomer:fix/cloud-file-overwrite
Open

feat(firestore): allow users to overwrite existing cloud files on upload#76
vibhutomer wants to merge 1 commit into
seetadev:mainfrom
vibhutomer:fix/cloud-file-overwrite

Conversation

@vibhutomer
Copy link
Copy Markdown

Fix: Enable Cloud File Overwrites / Updates

Related Issue

Description of Changes

  • Refactored the uploadFileToCloud function in firestore.ts.
  • Previously, the app forced a rename operation if a file already existed in the cloud, removing the ability to "update" or "sync" existing invoices.
  • Implemented a confirm() dialog. If the user chooses to overwrite, the code seamlessly updates the existing document. If they decline, it prompts them to save as a new copy.

Impact

  • Core Functionality Restored: Users can now actually save changes to their existing cloud invoices without generating duplicates.
  • Improved UX: Replaced the jarring alert() with a clear, standard "Do you want to overwrite?" workflow.
  • Cleaner Database: Prevents users from cluttering their Firebase storage with unnecessary versioned files (invoice_1, invoice_2, etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot Overwrite/Update Existing Cloud Files (Forced Rename)

1 participant