Skip to content

Conversation

@shaloo
Copy link
Contributor

@shaloo shaloo commented Nov 14, 2022

Pull Request Template

Resolves or continues AR-4947.

Blocking dependencies

NA

Changes

Upload File section updated with additional code snippet and some usage guidance on specifying chunk size during upload.

Checklist

  • The branch name follows the format: developer/AR-XXX-issue-name.
  • The changes have been tested locally.

@shaloo shaloo added the documentation Improvements or additions to documentation label Nov 14, 2022
@shaloo shaloo requested a review from SauravKanchan November 14, 2022 08:42
@shaloo shaloo self-assigned this Nov 14, 2022
@netlify
Copy link

netlify bot commented Nov 14, 2022

Deploy Preview for storagesdk-ref-guide ready!

Name Link
🔨 Latest commit cd31a51
🔍 Latest deploy log https://app.netlify.com/sites/storagesdk-ref-guide/deploys/6371ff8fd1885c0008f8e07f
😎 Deploy Preview https://deploy-preview-166--storagesdk-ref-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@shaloo shaloo changed the base branch from main to dev November 14, 2022 08:43

### Upload Chunk Size

Arcana Storage SDK uses chunked uploading mode. Each file is split into chunks of default size 10MB and chunks are uploaded one by one. These chunks are further processed on the server, encrypted, and split into multiple parts before being stored in the Arcana Store. Chunked uploading helps to overcome the server's default upload size limitation and there is no server-side setting change required to upload a very large file size. Also, it helps in decentralizing data storage.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uses chunked uploading mode

What does that even mean? I suggest: “uploads files in chunks”.

chunks of default size 10MB

I recommend: “chunks (10 MiB by default)”.


Arcana Storage SDK uses chunked uploading mode. Each file is split into chunks of default size 10MB and chunks are uploaded one by one. These chunks are further processed on the server, encrypted, and split into multiple parts before being stored in the Arcana Store. Chunked uploading helps to overcome the server's default upload size limitation and there is no server-side setting change required to upload a very large file size. Also, it helps in decentralizing data storage.

You can change the default chunk size while uploading a file. Make sure the new chunk size is a multiple of 16 otherwise there may be issues in downloading the file.
Copy link
Contributor

@mmjee mmjee Nov 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there may be issues in downloading the file

Could be worded more precisely.

Suggested change
You can change the default chunk size while uploading a file. Make sure the new chunk size is a multiple of 16 otherwise there may be issues in downloading the file.
You can change the default chunk size while uploading a file. Make sure the new chunk size is a multiple of 16 (bytes) otherwise you may face unexpected issues if you try to download the file.

2. Import `StorageProvider` from the Storage SDK package in the dApp. Call `init` method of `StorageProvider` and specify the Web3 wallet `provider` and the `appAddress` as input parameters. **Note:** Get the provider via the Auth SDK or third-party supported wallet. You can copy the appAddress from the [Arcana Developer Dashboard](https://docs.beta.arcana.network/docs/config_dapp) after registering your dApp
3. Use `StorageProvider` to:
- `upload` and push file data into the Arcana Store. **Note:** Save file DID that is returned after file upload operation is successful.
- `upload` and push file data into the Arcana Store. **Note:** Save file DID that is returned after the file upload operation is successful.
Copy link
Contributor

@mmjee mmjee Nov 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good opportunity to fix this, “Save file DID” is not English.

Suggested change
- `upload` and push file data into the Arcana Store. **Note:** Save file DID that is returned after the file upload operation is successful.
- `upload` and push file data into the Arcana Store. **Note:** The newly saved file's DID is returned once the file upload operation is successful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants