Skip to content

remove legacy upload#1282

Open
Zetazzz wants to merge 1 commit into
mainfrom
fix/removing-legacy-upload
Open

remove legacy upload#1282
Zetazzz wants to merge 1 commit into
mainfrom
fix/removing-legacy-upload

Conversation

@Zetazzz

@Zetazzz Zetazzz commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes the legacy REST POST /upload endpoint from graphql/server.

This endpoint used a separate upload-specific auth path, multer parsing, and streamToStorage() helper. Upload flows should now use GraphQL-backed paths instead of deriving /upload from a GraphQL endpoint.

Changes

  • Removed graphql/server/src/middleware/upload.ts
    • createUploadAuthenticateMiddleware
    • uploadRoute
    • multer-based file parsing
    • upload-specific RLS/auth fallback logic
  • Removed /upload route registration from graphql/server/src/server.ts
  • Removed upload middleware exports from graphql/server/src/index.ts
  • Removed streamToStorage() from graphile-settings
  • Removed now-unused server dependencies:
    • multer
    • @types/multer
    • @pgsql/quotes
    • @constructive-io/upload-names
  • Deleted legacy upload middleware tests
  • Updated upload architecture docs to reflect the REST endpoint removal
  • Added dashboard follow-up notes for known /upload consumers in packages/sheets

Dashboard Follow-Up

Dashboard still has runtime code that derives /upload from /graphql, mainly in the sheets upload flow. This PR documents that impact in:

graphile/graphile-upload-plugin/DASHBOARD_UPLOAD_FOLLOWUP.md

That dashboard work should migrate to a GraphQL-backed upload path separately.

Notes

This PR intentionally does not change the GraphQL multipart upload implementation or presigned upload flows. It only removes the historical REST upload endpoint and related dead server code.

@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm @launchql/protobufjs is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yamlnpm/@launchql/protobufjs@7.2.6

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@launchql/protobufjs@7.2.6. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm @noble/hashes is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yamlnpm/@noble/hashes@1.8.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@noble/hashes@1.8.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm @noble/hashes is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yamlnpm/@noble/hashes@1.8.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@noble/hashes@1.8.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

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