This repository has been archived by the owner on Apr 18, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Creating this PR primarily as an example of using the blockstack.js storage APIs, and the Web File APIs in PR hirosystems/stacks.js#693
The following storage functions are used:
listFiles
,getFile
,putFile
,deleteFile
. All are used with encryption enabled.putFile
is used with aFile
object from both a<input type="file">
element and theWeb Drag and Drop API
.A built and working version of this app can be used at https://zone117x.github.io/blockstack-file-api-demo/dist/index.html
Tested on MacOS with Chrome, Firefox, Safari; and on Windows with Edge.
Image file types are used and displayed as a decent visual indicator for seeing where something might be broken, especially since they tend to be larger file sizes.
Regarding actually merging this PR into the app-generator --
Seems like it would be useful for storage API examples to be setup, but this example usage output is pretty opinionated as an app scaffold. Perhaps it should be its own generator -- something like
yo blockstack:storage
?If not, then this PR can just serve as example usage for the reference PR, and possibly docs if we need any. The source can remain at my demo app repo https://github.com/zone117x/blockstack-file-api-demo