Releases: spheronFdn/sdk
Releases · spheronFdn/sdk
storage: v1.0.4
Fixes
- Fixed the Spheron logo in the README.md.
storage: v1.0.3
Improvements
- Improved the
README.md
.
storage: v1.0.2
Improvements
-
Added optional parameters
onUploadInitiated
andonChunkUploaded
to the upload function.- The
onUploadInitiated
is a callback function that has one parameter,uploadId
and will be called after the upload has been initiated. - The
onChunkUploaded
is a callback function that has two parameters. The callback is called each time a chunk is uploaded to the service. The first parameteruploadedSize
represent the uploaded size of the chunk in Bytes, and the second parametertotalSize
represent the total size of the upload.
- The
-
Added
code-of-conduct.md
,contribution-guidelines.md
,support.md
and aREADME.md
on the monorepo level.
storage: v1.0.1
Improvments
- Added a description, author and keywords to the
package.json
.
Fixes
- Fixed a couple of typos in
README.md
.
storage: v1.0.0
Feature
Created a package named @spheron/storage
. This package provides support for uploading files and directories to a specified protocol.
- The
@spheron/storage
package exports a classSpheronClient
, which takes a configuration object in its constructor with one propertytoken
. SpheronClient
has one method,upload(filePath, configuration)
, which takes the file or directory from thefilePath
, chunks it into multiple payloads, and uploads them in parallel.filePath
- parameter is the path to the file or directory that is being uploaded.configuration
object has two properties:protocol
- the protocol on which the file or directory should be uploaded. Valid values are [ARWEAVE
,IPFS
,FILECOIN
].name
- the name of the bucket for which the data should be uploaded.
- The response of the
upload
function is an object with the parameters:uploadId
- the id of the uploadbucketId
- the id of the bucketprotocolLink
- is the protocol link of the uploaddynamicLinks
- are domains that you have set up for your bucket. When you upload new data to the same bucket, the domains will point to the new uploaded data.