What is Nostr?
Simon Willison /
npub13v9…w5eu
2024-03-24 15:28:09

Simon Willison on Nostr: A pattern I'm leaning more into at the moment is having code in the browser handle ...

A pattern I'm leaning more into at the moment is having code in the browser handle parsing difficult file formats, then that browser code sends the modified version back to an API on the server

Examples:

- parse a huge CSV/TSV in the browser, send to backend in batches
- ditto for .xlsx
- load a PDF in the browser, extract text with PDF.js, send just the text to the server
- similar trick, but turn the PDF into a JPEG for each page and submit those images
- convert SVG to PNG in the browser
Author Public Key
npub13v97j0kknscwnf5pt87nsn7cxzxwfwl3dsu7ss8qsq7ukmqgwg8q84w5eu