This repository was archived by the owner on Feb 27, 2026. It is now read-only.
Fix 401 error on Reverse Share uploads for files ≥100MB#369
Merged
danielalves96 merged 5 commits intonextfrom Dec 10, 2025
Merged
Fix 401 error on Reverse Share uploads for files ≥100MB#369danielalves96 merged 5 commits intonextfrom
danielalves96 merged 5 commits intonextfrom
Conversation
Co-authored-by: danielalves96 <62755605+danielalves96@users.noreply.github.com>
Co-authored-by: danielalves96 <62755605+danielalves96@users.noreply.github.com>
Co-authored-by: danielalves96 <62755605+danielalves96@users.noreply.github.com>
Co-authored-by: danielalves96 <62755605+danielalves96@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix 401 error on Reverse Share file upload
Fix 401 error on Reverse Share uploads for files ≥100MB
Dec 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
Reverse Share uploads fail with 401 "Token inválido ou ausente" for large files (≥100MB) requiring multipart uploads. The
/api/files/multipart/*endpoints enforce JWT authentication, incompatible with unauthenticated external users accessing via reverse share links.Changes
Backend (
apps/server)validateReverseShareAccessByAlias()helper to validate password/expiration/status/reverse-shares/alias/:alias/multipart/*:POST /create- Initialize upload, returnsuploadIdandobjectNameGET /part-url- Generate presigned URL for part uploadPOST /complete- Finalize multipart uploadPOST /abort- Cancel upload and cleanupFrontend (
apps/web)useUppyUploadhook with optionalcustomMultipartFunctionsparameterFileUploadSectioncomponent to inject custom functions when uploading to reverse sharesExample
External users uploading via reverse share now use password-authenticated endpoints:
🔗 Related Issue(s)
This PR addresses the reverse share upload failure issue.
💡 Motivation and Context
Reverse shares enable external users to upload files without authentication. Small files (<100MB) use simple PUT uploads and work correctly. Large files require multipart uploads, which were hardcoded to use JWT-protected endpoints, breaking the unauthenticated workflow.
🤖 Use of Artificial Intelligence (AI)
🧪 How Has This Been Tested?
📸 Screenshots (if appropriate)
The error shown in the original issue:
🔄 Types of Changes
✅ Checklist
nextbranch🙏 Thank you for your contribution!
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
checkpoint.prisma.io/usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/Palmr/Palmr/apps/server/node_modules/.pnpm/prisma@6.11.1_typescript@5.8.3/node_modules/prisma/build/child {"product":"prisma","version":"6.11.1","cli_install_type":"local","information":"","local_timestamp":"2025-12-08T13:21:16Z","project_hash":"91d7cb56","cli_path":"/home/REDACTED/work/Palmr/Palmr/apps/server/node_modules/prisma/build/index.js","cli_path_hash" sh cal/�� tsc --noEmit src/modules/reverse-share/service.ts src/modules/reOUTPUT(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.