Skip to content

fix(meteor-backend): pulsevault upload reliability fixes#437

Open
Dharp02 wants to merge 1 commit into
mainfrom
fix/pulsevault-upload-reliability
Open

fix(meteor-backend): pulsevault upload reliability fixes#437
Dharp02 wants to merge 1 commit into
mainfrom
fix/pulsevault-upload-reliability

Conversation

@Dharp02

@Dharp02 Dharp02 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator
  • Fix repeated 409 'artifactId already has an upload': clear stale incomplete reservations before retrying a TUS create, while leaving completed (ready) artifacts untouched.
  • Fix 'server returned upload location is in unexpected origin': rewrite the Location header's scheme+host to the canonical ROOT_URL origin via a res.setHeader interceptor (the previous writeHead-only patch missed it, since @tus/server's setResponse() sets headers via setHeader before calling writeHead with no header args).
  • Persist reservationContext to MongoDB (pulsevault_reservations, TTL 24h) instead of a plain in-memory Map, so reservations survive process restarts and onUploadComplete can still find them to create ticket attachments / media items.
  • Add project: ['.pulse'] to allowedExtensions to prevent a crash on fresh (non-resumed) project-kind uploads.
  • Revert @mieweb/pulsevault dependency from the ^0.1.0 npm registry tarball back to github:mieweb/pulsevault, undoing an accidental downgrade introduced in 5102448 (unrelated test-isolation commit).
  • Normalize X-Forwarded-Proto in server/main.js before it reaches any handler (upstream proxy sometimes sends malformed/multi-value values).
  • Add missing bcrypt import in auth-bridge.js.

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

🚀 Preview Deployment Ready

Service URL
App https://mieweb-timehuddle-fix-pulsevault-upload-reliability.os.mieweb.org
API (Meteor) https://mieweb-timehuddle-fix-pulsevault-upload-reliability-api.os.mieweb.org

Preview auto-deletes when this PR is closed.

- Backend: Add thumbnail kind to PulseVault allowedExtensions (.jpg, .jpeg, .png)
- Backend: Handle thumbnail uploads in onUploadComplete hook, linking to parent video via relatedTo
- Frontend: Extract and upload thumbnails after Pulse video uploads complete
- Frontend: Extract thumbnails in parallel for direct device uploads

Fixes the '400 Rejected by server' error shown in Pulse app after successful video uploads.
The error was from a separate thumbnail upload request that Pulse makes after the main video.
Now both the video and thumbnail uploads succeed, providing better UX.
@Dharp02
Dharp02 force-pushed the fix/pulsevault-upload-reliability branch from 5493bd5 to f90c5b9 Compare July 21, 2026 20:27
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.

1 participant