You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've just upgraded from wrangler 1 -> 2. We were using wrangler kv:key put to upload images into KV from CLI. It seems in wrangler 2 those images get mangled when uploading.
Thanks for reporting this issue. I'll take a look. I suspect that we need a way to determine that the file contains binary data and therefore needs to be base64 encoded...
Hi @petebacondarwin, it can actually be fixed by not using the readFileSync utility from here and instead directly leveraging node:fsreadFileSync without an encoding, to get a Buffer back.
have just tested this and it works, happy to PR if needs be
What version of
Wrangler
are you using?2.0.8
What operating system are you using?
Mac
Describe the Bug
We've just upgraded from wrangler 1 -> 2. We were using
wrangler kv:key put
to upload images into KV from CLI. It seems in wrangler 2 those images get mangled when uploading.I believe it is related to this line and the fact that values are always passed as strings...
https://github.com/cloudflare/wrangler2/blob/e3ce82b0cbb5e5765fa09ab3322b42a5b75934e3/packages/wrangler/src/index.tsx#L2262-L2265
The text was updated successfully, but these errors were encountered: