Expand description
Bundle (Share Link) operations
Bundles are the Files.com API term for Share Links. They allow you to share files and folders with external users via a public URL with granular access controls.
§Features
- Create shareable links to files and folders
- Password protection and expiration dates
- Access controls (read, write, preview-only)
- Registration requirements and user tracking
- Email sharing with notifications
- Custom branding and legal clickwrap
§Example
use files_sdk::{FilesClient, BundleHandler};
let client = FilesClient::builder()
.api_key("your-api-key")
.build()?;
let handler = BundleHandler::new(client);
// Create a password-protected share link that expires in 7 days
let bundle = handler.create(
vec!["/reports/quarterly-2024.pdf".to_string()],
Some("secure-password"),
Some("2024-12-31T23:59:59Z"),
None,
Some("Q4 2024 Financial Report"),
Some("Internal sharing only"),
None,
Some(true),
Some("read")
).await?;
println!("Share link: {}", bundle.url.unwrap_or_default());
// Share via email
handler.share(
bundle.id.unwrap(),
vec!["colleague@company.com".to_string()],
Some("Please review the Q4 report")
).await?;
Structs§
- Bundle
Entity - A Bundle entity (Share Link)
- Bundle
Handler - Handler for bundle operations
Enums§
- Bundle
Permission - Bundle permissions enum