Skip to content

dev(fs): add move command to batch executor#2646

Merged
KernelDeimos merged 1 commit intomainfrom
eric/263B0_batch-move
Mar 11, 2026
Merged

dev(fs): add move command to batch executor#2646
KernelDeimos merged 1 commit intomainfrom
eric/263B0_batch-move

Conversation

@KernelDeimos
Copy link
Copy Markdown
Contributor

Effectively this makes it possible to perform multiple move operations in a batch request.

Example:

(async () => {
  const form = new FormData();

  const operations = [
    {
      op: "move",
      source: "/admin/Desktop/first.txt",
      destination: "/admin/Desktop",
      new_name: "second.txt"
    }
  ];

  for (const op of operations) {
    form.append("operation", JSON.stringify(op));
  }

  const res = await fetch("http://api.puter.localhost:4100/batch", {
    headers: {
        Authorization: `Bearer ${puter.authToken}`,
    },
    method: "POST",
    body: form,
  });

  console.log("response:", await res.json());
})();

Effectively this makes it possible to perform multiple move operations
in a batch request.
@KernelDeimos KernelDeimos merged commit e56d8f6 into main Mar 11, 2026
4 checks passed
@jelveh jelveh deleted the eric/263B0_batch-move branch May 1, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant