How do I upload an image to a canister?

I want the flow to be :
A user uploads an image → It gets stored in a canister → A user can visit a url and see that image.

I do know about cancan but its a bit complicated.


Static images: use “asset” canisters (see the SDK quick start)
User-generated images: chunk image blobs in the client and call custom canister methods with those blobs as arguments (see CanCan’s source)

1 Like

@jzxchiang Where exactly should i look in cancans code

@kpeacock another dev with the same question on uploading blobs. I think I’ve made my point so I’ll stop @'ing you on stuff now. My apologies again :sweat_smile:

Check this out: File Storage On IC - #7 by jzxchiang