fix(supabase): storage upload + add basic mode version#2996
Merged
icecrasher321 merged 4 commits intostagingfrom Jan 25, 2026
Merged
fix(supabase): storage upload + add basic mode version#2996icecrasher321 merged 4 commits intostagingfrom
icecrasher321 merged 4 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryThis PR refactors the Supabase storage upload functionality to support both basic and advanced modes. The main changes include:
The implementation follows established patterns for file handling and includes comprehensive logging throughout the upload flow. Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant UI as Supabase Block UI
participant Tool as storage_upload.ts
participant API as /api/tools/supabase/storage-upload
participant FileUtils as File Utils
participant Supabase as Supabase Storage
User->>UI: Select mode (basic/advanced)
alt Basic Mode
User->>UI: Upload file via file-upload field
UI->>Tool: fileData = UserFile object
else Advanced Mode
User->>UI: Enter content in code field
UI->>Tool: fileData = string (base64/text)
end
Tool->>API: POST /api/tools/supabase/storage-upload
API->>API: checkInternalAuth()
API->>API: validate with SupabaseStorageUploadSchema
alt fileData is string
API->>API: Check for data URL pattern
API->>API: Detect if base64 or plain text
API->>API: Convert to Buffer
else fileData is object (UserFile)
API->>FileUtils: processSingleFileToUserFile()
FileUtils-->>API: userFile
API->>FileUtils: downloadFileFromStorage()
FileUtils-->>API: Buffer
end
API->>API: Construct fullPath with folder
API->>Supabase: POST /storage/v1/object/{bucket}/{path}
Supabase-->>API: Upload response
API->>API: Generate publicUrl
API-->>Tool: {success, output: {message, results}}
Tool-->>UI: Display results
UI-->>User: Show upload success
|
Collaborator
Author
|
@cursor review |
Collaborator
Author
|
@cursor review |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Supabase storage upload updates. Remove dead workspaces route.
Type of Change
Testing
Tested with @Sg312
Checklist