Skip to content

Conversation

@jim-counter
Copy link
Member

Problem: When uploading a new file, the status was incorrectly showing as "Archived" instead of "Processing" or "Publishing".

Root Cause: In the objectStatus function, the check for "Archived" (archivedNodes === totalNodes) came before the check for "Processing". When a file is first uploaded:

  • Both archivedNodes and totalNodes can be null or 0
  • null === null and 0 === 0 both evaluate to true in JavaScript
  • This caused new uploads to immediately show as "Archived"

Fix: Reordered the conditions to check for the "Processing" state first. Now the logic is:

  • If totalNodes or uploadedNodes is null or 0Processing
  • If archivedNodes === totalNodes (and both are valid positive numbers) → Archived
  • If uploadedNodes === totalNodes (all published but not all archived) → Archiving
  • Otherwise → Publishing

This matches the documented file lifecycle in file-lifecycle.md:

  • Processing: Nodes created but not published yet
  • Publishing: Some nodes published
  • Archiving: All nodes published, awaiting DSN confirmation
  • Archived: All nodes archived in DSN

Fixes #383

@netlify
Copy link

netlify bot commented Jan 26, 2026

Deploy Preview for auto-drive-storage ready!

Name Link
🔨 Latest commit 321bddf
🔍 Latest deploy log https://app.netlify.com/projects/auto-drive-storage/deploys/6977c381431adc0008d8c17f
😎 Deploy Preview https://deploy-preview-580--auto-drive-storage.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Member

@EmilFattakhov EmilFattakhov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome :)

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.

Files uploaded to Taurus immediately marked as "archived" - skipping "archiving" state

2 participants