Awarded: ICDevs.org - Bounty #45 - File Uploader Pattern - JS, Rust, Motoko - $10k

Wait how is it able to do preupgrade and postupgrade? Also where in the lib is it being done?

What kind of granular permission are you interested in?

I want to clarify. Using this hash card does not eliminate the use of the system function preupgrade and
system function portupgrade. That is, we cannot rely on it during the code update?

1 Like

Itā€™s still on a branch, but itā€™s ready to be used by anyone that wants to try it. Please ping me.

Before merging into main, the main outstanding issue is preparing the ā€œmigration featureā€ that installs the region manager into an existing, classic use of the experimental API. I should be making progress on that this week, but itā€™s not needed for dev that wants to try to build on regions, in preparation of that eventually being finished soon.

1 Like

What are the main resources I can parse through to learn more? What are the main github repos? Is it just base?

Gzip compression such as pako: pako 2.1.0 API documentation only saves like 1% space on multimedia files so I donā€™t think it is worth pursuing. It works best for text based files but not sure that is something most people will upload. Adds more complexity than reward. Better to focus on stable storage and good UI examples.

So for this I think a storage system similar to Dropbox will do the most good, so I am going to demonstrate that for the file storage code. However, it will be able to do more than just store files and share those files with people, it will be able to share with other applications. This will be an experiment but I think it will be really cool how it can be the foundation for many types of applications.

1 Like

Weā€™ve done a lot of this sort of experimentation with our filesystem library. Itā€™s still being refined. Let me know if youā€™d like to chat again.

Sure let me know when. The more I think about it the more important it becomes.

@skilesare whatā€™s the update for the rust side? is it still open?

Hey @cyberowl, what is the status here? Do we have the three pieces all together so we can close out the bounty? Do we still need a rust implementation?

I believe @pramitgaha is working on the rust side of things. We will update soon. I need to review all the changes.

1 Like

@cyberowl
should I push my work to your repo?
or leave as it is?

Leave as it is. I just want the github link.

Adding all repos for ref:

note: agent-js-file-upload changes need to be merged into agent, this repo was used for testing

repos

website

https://kriz4-caaaa-aaaag-abrha-cai.icp0.io/
https://static.icp.xyz/

1 Like

Amazing Guys! Thanks for the work. Iā€™ll get it reviewed and submitted for approval.

Can you give an example of how you can inject this into agent-js? Iā€™d love to get @kpeacock take on it.

1 Like

I am thinking about something like this:


Developer would just need to install dep similar to other deps in agent-js and then import AssetManager. They only need to provide the canister id and host to start interacting with the canister.

I am always open to feedback as well. I want to make this easy to use. Identity can be assigned as well, if they want to authorize the user.

You can assign it a static canister or a dynamic one that is shown by calling file_scaling_manager. This allows for scaling within the 4gb size canisters. Like how memory works in canisters we only scale up, although we can reuse can memory but that would complicate this example case.

A timer is used to check the health of each canister and create a new one when it fills up. There are different ways to go about this, I just used the easiest to follow.

1 Like

Just following on the review status of this.

1 Like

Did you every hear anything from @kpeacock ? It would be great to find some dapps that need this tech and can validate it.

1 Like

I assisted @iamenochchirima with onboarding. So far, I havenā€™t received any communication from kpeacock. Nonetheless, the technology is available and can be tested at https://static.icp.xyz/. While I can try reaching out to some of the dapps, it might take some time before they onboard. I believe that Static is excellent and has the potential to be transformed into a platform for hosting larger content such as videos. I have presented it there. I will try to connect with dapps, but I cannot make any guarantees.

1 Like