TILION_API_KEY and TILION_SESSION_ID. These routes work while a Playwright or CDP client is connected.
Upload a file
SetUPLOAD_FILE to a local path. Each example streams the file and prints the path on the session’s machine. The default limit is 200 MB.
Attach it to a file input
Pass the returned path toDOM.setFileInputFiles from a Playwright CDP session. Set CONNECT_URL to the session’s connect_url and UPLOADED_PATH to the printed path, and open the page with the file input first.
Collect a download
Encode a file’s name when you put it in a URL. A# or ? that isn’t encoded ends the path, so the request reaches a different file.
After a click starts a download, poll the list until a file is finished, then read it. in_progress is true while Chrome is still writing. Each example saves the first finished file.
With Playwright connected, a download’s name in the list is
playwright-downloads/<folder>/<GUID>, so the saved file takes the GUID as its name. Rename it with Playwright’s suggested_filename. The examples above read these names as they are.