Skip to content

Spread syntax requires ...iterable[Symbol.iterator] to be a function #34

@danieltan007

Description

@danieltan007

hello
im trying to add heic file in my next js 14 app with formData on my windows machine using this code

const data = await req.formData();
const kk = data.get("kk") as File;
const kk_buffer = kk && kk instanceof Blob ? await kk.arrayBuffer() : undefined;
if (kk.name.split(".")[1] === "heic" || kk.name.split(".")[1] === "heif") {
	const kk_converted = await convert({
	  buffer: kk_buffer,
	  format: "JPEG",
	});
  console.log("🚀 ~ kk_converted:", kk_converted)
}

and i got error like this: Spread syntax requires ...iterable[Symbol.iterator] to be a function

is this because im upload from my windows machine?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions