Part of #1458.
hosting/photo-storage demonstrates programmatic uploads via AssetManager from @icp-sdk/canisters/assets. Since #1449 switched it to @dfinity/static-site, the example is broken at runtime: the certified-assets canister exposes none of the legacy API (list, store, create_batch, commit_batch — verified against certified-assets.did). App.jsx calls assetManager.list() on page load, so the app fails immediately. Only authorize coincidentally still resolves (certified-assets has a flat authorize model), masking the breakage.
Rewriting against the new interface is not viable: certified-assets mutations go through a single-session start_sync/upload_chunks/execute_operations protocol that is version-locked to the recipe's sync plugin and designed for deploys, not concurrent end-user uploads.
Interim fix (unblocks the example now): revert the recipe to @dfinity/asset-canister@v2.2.1 — the only canister supporting the AssetManager flow — with a comment explaining the deliberate exception, and verify the app works end-to-end again.
Long-term decision:
- (a) keep it permanently on the legacy recipe as the programmatic-uploads example, clearly labeled;
- (b) repurpose it to store photos in a purpose-built backend canister (overlaps with
rust/photo_gallery);
- (c) retire it.
Depends on whether the legacy asset canister remains supported (icskills#256 keeps it as documented legacy) and whether a runtime-upload story exists/is planned for certified-assets.
Part of #1458.
hosting/photo-storagedemonstrates programmatic uploads viaAssetManagerfrom@icp-sdk/canisters/assets. Since #1449 switched it to@dfinity/static-site, the example is broken at runtime: the certified-assets canister exposes none of the legacy API (list,store,create_batch,commit_batch— verified against certified-assets.did).App.jsxcallsassetManager.list()on page load, so the app fails immediately. Onlyauthorizecoincidentally still resolves (certified-assets has a flat authorize model), masking the breakage.Rewriting against the new interface is not viable: certified-assets mutations go through a single-session
start_sync/upload_chunks/execute_operationsprotocol that is version-locked to the recipe's sync plugin and designed for deploys, not concurrent end-user uploads.Interim fix (unblocks the example now): revert the recipe to
@dfinity/asset-canister@v2.2.1— the only canister supporting the AssetManager flow — with a comment explaining the deliberate exception, and verify the app works end-to-end again.Long-term decision:
rust/photo_gallery);Depends on whether the legacy asset canister remains supported (icskills#256 keeps it as documented legacy) and whether a runtime-upload story exists/is planned for certified-assets.