/ 1 min read

Changelog #007

A new Files API for sessions to upload, use, and download files in your automation workflows, plus browser stability fixes.

Hey y’all! This week's update brings an exciting new Files API for Sessions, along with several improvements to the Steel browser experience and important bugfixes to enhance stability.

New

Files API for Sessions

The new Files API enables seamless file management within active browser sessions. You can now upload files from your local machine, use them in your automation workflows, and download files back when needed - perfect for testing file uploads or working with documents in your browser automation.

// Upload a file to your session
const file = new File(["Hello World!"], "hello.txt", { type: "text/plain" });
const uploadedFile = await client.sessions.files.upload(session.id, { file });

// Create a CDP session to pass in some custom controls
const cdpSession = await currentContext.newCDPSession(page);
const document = await cdpSession.send("DOM.getDocument");

// We need to find the input element using the selector
const inputNode = await cdpSession.send("DOM.querySelector", {
  nodeId: document.root.nodeId,
  selector: "#load-file",
});

// Set the CSV file as input on the page.
await cdpSession.send("DOM.setFileInputFiles", {
  files: [uploadedFile.path],
  nodeId: inputNode.nodeId,
});

// Download a file from your session
const response = await client.sessions.files.download(session.id, file.id);
const downloadedFile = await response.blob();

Documentation Link | Steel Cookbook

Bugfixes/Improvements

As always, thanks for testing out the Steel beta. We really look forward to more of your feedback and continuing to build with this awesome, curious, and supportive community.

Got questions or want to chat? Join us on Discord or reach out on Twitter/X.

We believe the future of browser automation is open source.

Steel Browser is built in the open on GitHub.
Run it yourself, read every line, and help shape what comes next.