Загрузка...

File I/O and EASY Image Conversion | Beginner's Guide to Bun #5

Hey everyone, I'm Average. In this episode of "Beginner's Guide to Bun" we check out Bun's native implementation for reading and writing files to our local filesystem.

We also look at implementing our own easy JPEG to PNG conversion route using a library called Sharp. Using Bun's I/O and Sharp for conversion, we successfully create an endpoint that can convert most images to PNG in seconds.

Thanks for watching!

Bun File IO: https://bun.com/docs/runtime/file-io#reading-files-bun-file
Sharp npm package: https://www.npmjs.com/package/sharp
Bun Website: https://bun.com

[00:00] - Intro & Project Overview
[00:34] - Installing Sharp
[00:48] - Setting Up the File System
[01:31] - Handling the Upload Request
[02:33] - Generating a Unique File Path
[03:47] - Saving the Image with Bun
[04:02] - Returning the File to the User
[04:58] - Testing the API with Bruno
[06:00] - Fixing the File Download Name
[06:31] - Outro

Видео File I/O and EASY Image Conversion | Beginner's Guide to Bun #5 канала Average
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять