cloudflare 11.0.0
cloudflare: ^11.0.0 copied to clipboard
This is a dart package for Cloudflare APIs — Images, Stream, Live Inputs, and R2 object storage (S3-compatible).
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Types of changes
Addedfor new features.Changedfor changes in existing functionality.Deprecatedfor soon-to-be removed features.Removedfor now removed features.Fixedfor any bug fixes.Securityin case of vulnerabilities.
11.0.0 #
Added #
- Added
uploadUrltoTusAPI,tusStreamandtusDirectStreamUploadto resume an upload created by a previous run, even from a process that is long gone, instead of starting the file over. - Added
onUploadCreatedcallback toTusAPI.startUpload()to get the upload URI to persist as soon as it is known. - Added
TusAPI.dataUploadDraftto get the draft with the id of the video the upload produces. - Added
progressSliceSize,retryDelaysandfingerprintGeneratortoTusAPI,tusStreamandtusDirectStreamUpload. - Added
onErrorcallback toTusAPI.startUpload()to get errors through a callback instead of thrown exceptions. - Added
TusAPI.close()to dispose the http client used for tus uploads. - Added
TusAPI.offsetto get the amount of bytes the tus server has confirmed.
Changed #
- Dependency breaking change version updated to
tusc: ^4.0.0. - A tus upload backed by a cache now resumes the upload previously started for the same fingerprint instead of creating a new one.
dataUploadDraftis now optional inTusAPIandtusDirectStreamUpload, since an upload resumed throughuploadUrlhas already been created.TusAPI.startUpload()called while an upload is already running now adopts the callbacks given to it and joins that upload instead of starting a second one.TusAPI'sonTimeoutCallbackis now used as the fallback for theonTimeoutofstartUpload(), instead of being ignored.TusAPI.startUpload()'sonCompletenow reportsnullwhen nothing identifies the uploaded video, instead of a video with an empty id.
10.0.0 #
Added #
R2API— full S3-compatible Cloudflare R2 object-storage API, authenticated with AWS Signature Version 4 viaR2Credentials(separate from the Cloudflare Bearer token used by the other APIs).
9.0.0 #
Changed #
- Dependency breaking change version updated to
tusc: ^3.0.0. - Updated dart sdk constraints to
sdk: '>=3.10.0 <4.0.0'
8.0.0 #
Changed #
- Updated
CustomParseErrorLoggerwith optionalResponseparameter as per new Retrofit version. - Updated dependencies to latest breaking change versions.
7.0.0 #
Added #
- Added support for Web, this required several breaking changes due to the replace of
Fileusage byXFile. - Added
interceptorsto allow adding Dio interceptors globally. - Added
cancelTokenCallbackto allow cancelling requests on any request globally. - Added
cancelTokento each individual API request.
Changed #
- Cloudflare instance initialization improved to avoid required call to
init()function. - Changed
HttpClient httpClientforHttpClientAdapter? httpClientAdapterto allow more customization of Dio client.
6.0.0 #
Changed #
- Sdk constraint updated to:
sdk: '>=3.8.0 <4.0.0' - Updated dependencies to latest versions.
3.2.0+1 #
Changed #
- Some dependencies updated.
- Deprecated code refactored.
customAccountSubdomainUrlfield added toCloudflareStreamVideoto better handle serving on-demand videos and thumbnails, avoiding deprecatedvideodelivery.netandcloudflarestream.comdomains.
2.1.0+14 #
Added #
- Custom
fileNamecan be specified for image upload from file, path and bytes, whether signed upload or direct upload. - Custom
fileNamecan be specified for stream upload from file, path and bytes, whether signed upload or direct upload.
1.3.0+11 #
Added #
connectTimeout,receiveTimeoutandsendTimeoutadded to support different Dio timeouts.
1.2.0+9 #
Added #
- Support for specific account subdomain streaming url.
CloudflareStreamVideo.fromUrl(...)accepts urls likehttps://customer-{CODE}.cloudflarestream.com
1.1.0+8 #
Added #
DataTransmitadds aCancelTokenproperty to allow to cancel requests on any request that uses aDataTransmitinstance, like image upload or video stream upload.
1.0.1+7 #
Fixed #
- Wrong assert validation removed from
tusDirectStreamUpload(...)function that prevented from doing direct stream upload using tus protocol.