-
Notifications
You must be signed in to change notification settings - Fork 592
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
File Manager #268
Comments
Seems like a 'File' field type would solve this. Initially I thought about having a 'files' button in the toolbar to see all the files used on the site, but that would separate that from the modular context they're being used, so if you add files from there you'd then have to go into the Block where they're used and select them. It could possibly be used in conjunction with adding/removing files from the Block fields, but adding the field would be the first step. I like the idea of adding another bucket named 'files' since Primo's going to treat images and files separately (at least with different field types). And that way we can avoid breaking changes. |
I still prefer having a "file manager" for the entire site as I am not necessarily using the files in a component; thus a simple files field, similar to how image field works minus the thumbnail, won't cut it. What I proposeBucket StructureSites - not available in file manager, for internal use Needless to say that you need to have the site open in Primo and you can only access that site's folders. Functionality
Fields integrationImage FieldInstead of directly uploading an image it opens the file manager straight in the images bucket. You can select an image from there or upload a new one. Different image variants the user may have created (e.g. full, thumb-small, thumb-medium, full-filter-sepia etc.) could all live in a dropdown selector:
Files FieldInstead of directly uploading a file it opens the file manager straight in the files bucket. You can select a file from there or upload a new one. Some files can even have previews (e.g. PDFs). UX Issues
UII'll prepare some drafts |
Great ideas! When would you upload files but not use them in particular blocks? I could see it being useful to manage all of the images/files on the site from one place though. Thinking about it some more, the two categories (images and files) could just be folders corresponding to buckets. Those would just be the default two folders, but you could replace them or add more folders, setting accepted file types for each (e.g. SVGs, fonts, videos). Then the image field and file field would have access to all of the images/files, categorized by folder and have the capability to upload new images/files. |
I was looking for a alternative to uploading the files to supabase and found this issue. Maybe it is possible to include some image optimizations, like https://kit.svelte.dev/docs/images#sveltejs-enhanced-img Benefits:
|
Is your feature request related to a problem? Please describe.
Primo only allows for image uploads. My websites also include videos, custom fonts, pdfs etc.
Describe the solution you'd like
A simple file manager that can upload/download/rename/delete files per site. Image editing would be nice as well. I'd be happy to implement this myself. I found this nice library to manage uploading and image editing, and I'll DIY the rest of the UI/backend.
Describe alternatives you've considered
In v1 I manually uploaded any files I needed through Supabase dashboard in the assets folder. In v2 having 2 buckets kinda confused me. Like: should I put my fonts in
sites
bucket orimages
? Maybe I should manually create afonts
or afiles
bucket? Whyimages
bucket and not justassets
? Having multiple buckets will make the file manager unnecessarily more complicated IMHO.Additional context
Since everything deploys to github now; maybe the assets should be deployed there as well so the CDN of the client's choice (a.k.a. wherever he actually deploys the site) serves them instead of supabase.
We can also automatically create thumbnails through this without using Supabase's Storage Image Transformations.
Moreover; the file manager should also be aware of supabase's and github's quotas and show a progress bar meter. Also when trying to upload something that won't fit it should cancel the upload and produce an error.
The text was updated successfully, but these errors were encountered: