Creating folders
Via the dashboard
- Navigate to the Files section
- Click “New Folder”
- Enter a folder name
- Optionally configure:
- Public visibility
- Allow uploads from others
- Parent folder (for nesting)
Via the API
Create a folder with the API:Folder structure
Each folder in the database contains:prisma/schema.prisma:310-327.
Nested folders
Folders support unlimited nesting depth:Creating nested folders
Viewing folder hierarchy
Get a folder with its parent chain:src/lib/db/models/folder/buildParentChain.
Adding files to folders
During upload
Upload directly to a folder:After upload
Move an existing file to a folder:Creating folder with files
Create a folder and add files in one request:Public folders
Public folders can be shared with others:Public folders show their contents to anyone with the link, but users must still be authenticated to view individual files unless the files themselves are public.
Upload permissions
Allowing uploads
Enable anonymous uploads to a folder:Files uploaded anonymously to a folder are owned by the folder owner and count toward their quota.
src/server/routes/api/upload/index.ts:51-60.
Managing folders
Updating folder properties
Moving folders
Change the parent folder:Deleting folders
When deleting a folder, you must specify what happens to its contents:Move to root
Move all files and subfolders to the root level:Move to another folder
Move contents to a different folder:Cascade delete
Delete the folder and all its contents recursively:src/server/routes/api/user/folders/[id]/index.ts:242-328.
Removing files from folders
Remove a file without deleting it:Querying folders
List all folders
List root folders only
List folders by parent
Get folder without files
For performance, exclude file details:Exporting folders
Zipline supports exporting entire folders as ZIP archives:src/server/routes/api/user/folders/[id]/export.ts for implementation.
Folder statistics
Each folder response includes file and subfolder counts:_count feature.
FAQs
What's the maximum folder nesting depth?
What's the maximum folder nesting depth?
There’s no hard limit, but very deep nesting (>10 levels) may impact performance when building parent chains. Keep your folder structure reasonable for best performance.
What happens to folder files when I reach my quota?
What happens to folder files when I reach my quota?
Files in folders count toward your quota. If you exceed your quota, you won’t be able to upload new files to any folder until you free up space.
Can I move files between folders?
Can I move files between folders?
Yes, you can add files to folders or remove them at any time. A file can only be in one folder at a time.
How do I prevent a folder from being moved into itself?
How do I prevent a folder from being moved into itself?
Zipline automatically prevents circular references. When updating a folder’s parent, the system checks the entire parent chain to ensure the folder isn’t being moved into one of its descendants.