Sharing Files
Learn how to share files and folders with others.
Sharing Methods
ZeroDrive supports two types of sharing:
| Method | Access | Authentication | Best For |
|---|---|---|---|
| User Sharing | Specific users | Required | Team collaboration |
| Public Links | Anyone with link | Not required | External sharing |
User-to-User Sharing
Share files with specific users who must authenticate to access them.
Share a File
Request
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
emails | array | Yes | List of email addresses to share with |
role | string | Yes | Permission level: viewer, editor, or owner |
canShare | boolean | No | Allow recipients to re-share (default: false) |
message | string | No | Optional message sent with share notification |
Response
Permission Roles
| Role | View | Download | Edit | Delete | Manage Permissions |
|---|---|---|---|---|---|
viewer | ✓ | ✓ | ✗ | ✗ | ✗ |
editor | ✓ | ✓ | ✓ | ✗ | ✗ |
owner | ✓ | ✓ | ✓ | ✓ | ✓ |
Share a Folder
Share an entire folder including its contents:
Folder permissions automatically apply to all files and subfolders within.
Managing Permissions
List File Permissions
Response
Update Permission
Remove Permission
Public Link Sharing
Create public links that anyone can access without authentication.
Create Public Link
Response
Public links expire after 30 days by default.
Access Public File
Anyone can access public files via the link:
No authentication required!
Response
Revoke Public Link
After revoking, the public link immediately stops working.
Public Folder Sharing
Create Public Folder Link
View Public Folder Contents
Response
Download Public Folder as ZIP
Save Public Folder to Own Drive
Authenticated users can save a public folder to their own drive:
Email Notifications
When sharing files, recipients receive email notifications:
- Existing users: Email + in-app notification
- Non-users: Email invitation to sign up
The email includes:
- File/folder name
- Sharer's name
- Assigned role
- Direct link to access
- Custom message (if provided)
Code Examples
JavaScript: Share and Track
Python: Bulk Sharing
Security Considerations
-
Principle of Least Privilege
- Start with
viewerrole and upgrade as needed - Disable
canShareunless necessary
- Start with
-
Public Links
- Remember: Anyone with the link can access
- Revoke links when no longer needed
- Don't share sensitive data via public links
-
Audit Access
- Regularly review who has access to important files
- Remove access for former team members
-
Expiration
- Public links auto-expire after 30 days
- User shares persist until manually revoked