kodadot / workers

Implementation of Cloudflare Workers in KodaDot
https://kodadot.xyz
9 stars 12 forks source link

feat(image): upload image endpoint #300

Closed hassnian closed 3 months ago

hassnian commented 3 months ago

Context

Add /image/upload endpoint

Ref

PR Type

socket-security[bot] commented 3 months ago

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@kodadot/workers-utils@1.0.0 None 0 0 B
npm/hono@3.12.12 None 0 566 kB yusukebe
npm/hono@4.3.6 None 0 815 kB yusukebe
npm/hono@4.4.5 None 0 887 kB yusukebe
npm/nuxt-og-image@3.0.0-rc.53 Transitive: environment, network +1 9.89 MB harlan_zw
npm/prettier@3.2.5 environment, filesystem, unsafe 0 8.39 MB prettier-bot
npm/prettier@3.3.2 environment, filesystem, unsafe 0 8.25 MB prettier-bot
npm/remark-parse@11.0.0 None 0 19.5 kB wooorm
npm/remark-stringify@11.0.0 None 0 19.6 kB wooorm
npm/typescript@5.4.5 None 0 32.4 MB typescript-bot
npm/ufo@1.5.3 None 0 103 kB pi0
npm/unified@11.0.4 None 0 147 kB wooorm
npm/vfile-matter@5.0.0 None 0 13.5 kB wooorm

View full report↗︎

hassnian commented 3 months ago

Use ipfs paths, chceck just-ipfs-cid package

can't find any reference to that package, can I get a link ?

vikiival commented 3 months ago

https://www.npmjs.com/package/ipfs-only-hash

vikiival commented 3 months ago

cc @preschian as he coded 90% of the worker

vikiival commented 3 months ago

@preschian pls merge if its ok

hassnian commented 3 months ago

@preschian any idea why that test is failing ? shouldn't affect that endpoint.

CleanShot 2024-06-20 at 12 31 00@2x

preschian commented 3 months ago

any idea why that test is failing ? shouldn't affect that endpoint.

yes, safe to ignore. because there's some change in this PR https://github.com/kodadot/workers/pull/308. the test file is hit real endpoint instead of local

vikiival commented 3 months ago

@preschian pls merge if its ok

Cc @preschian

vikiival commented 3 months ago

@hassnian pls resolve conflicts

preschian commented 3 months ago

I close this one. Let's create the endpoint on the profile-worker instead. If we merge this, the attacker can change the other profile by hitting this endpoint directly