-
Notifications
You must be signed in to change notification settings - Fork 462
feat: add assets library page for managing Supabase storage files #2738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add new route at /app/assets for authenticated users - Implement file navigator with folder navigation and breadcrumbs - Support single/multiple file upload and folder upload - Add multi-select functionality for bulk delete - Implement copy public URL feature - Add folder creation capability - Create Supabase migration for assets storage bucket with RLS policies Co-Authored-By: [email protected] <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for hyprnote ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for hyprnote-storybook canceled.
|
✅ Deploy Preview for howto-fix-macos-audio-selection canceled.
|
| for (const item of data || []) { | ||
| if (item.id === null && !seenFolders.has(item.name)) { | ||
| seenFolders.add(item.name); | ||
| items.push({ name: item.name, isFolder: true }); | ||
| } else if (item.id !== null) { | ||
| items.push({ ...item, isFolder: false }); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The folder detection logic filters items where id === null as folders. However, the .keep files created by createFolderMutation (line 178) will have a non-null id and will appear as regular files in the listing. This means users will see .keep placeholder files in their folder view, which breaks the folder abstraction.
// Filter out .keep files from the display
for (const item of data || []) {
if (item.name === '.keep') continue; // Skip .keep files
if (item.id === null && !seenFolders.has(item.name)) {
// ... folder handling
}
}| for (const item of data || []) { | |
| if (item.id === null && !seenFolders.has(item.name)) { | |
| seenFolders.add(item.name); | |
| items.push({ name: item.name, isFolder: true }); | |
| } else if (item.id !== null) { | |
| items.push({ ...item, isFolder: false }); | |
| } | |
| } | |
| for (const item of data || []) { | |
| if (item.name === '.keep') continue; // Skip .keep files | |
| if (item.id === null && !seenFolders.has(item.name)) { | |
| seenFolders.add(item.name); | |
| items.push({ name: item.name, isFolder: true }); | |
| } else if (item.id !== null) { | |
| items.push({ ...item, isFolder: false }); | |
| } | |
| } |
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
Summary
Adds a new Assets Library page at
/app/assetsfor marketers to manage images, videos, and other files in Supabase storage. This is a web-based file navigator with CRUD operations.Features implemented:
Database changes:
assetsbucket (public) with RLS policies scoped to user ID foldersReview & Testing Checklist for Human
webkitdirectoryattribute is non-standard; verify it works in Chrome/Edge (may not work in Firefox/Safari)Recommended test plan:
/app/assetswhile logged inNotes
public = true- all uploaded files will be publicly accessible via URL. Confirm this is the desired behavior for marketing assets.Link to Devin run: https://app.devin.ai/sessions/55d4032bd5d34421976e5264fcea8191
Requested by: [email protected] (@ComputelessComputer)