

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 8
click for more info
No active XP Potion
Accept a Quest
Login to submit answers
Great, now we're using base64 strings in our SQLite database to store images... let's talk about why that actually kinda sucks.
It's usually a bad idea to store large binary blobs in a database, there are exceptions, but they are rare. So what's the solution? Store the files on the file system. File systems are optimized for storing and serving files, and they do it well.

Let's update our handler to store the files on the file system. We'll save uploaded files to the /assets directory on disk.
http://localhost:<port>/assets/<videoID>.<file_extension>
Run and submit the CLI tests.
The Boot.dev CLI requires you to be signed in to submit your solution!
Copy/paste one of the following commands into your terminal:
Run
bootdev run 77abee5f-d10a-4fd5-adec-97b63130dad1
Submit
bootdev run 77abee5f-d10a-4fd5-adec-97b63130dad1 -s
bootdev config base_url <url>Run the CLI commands to test your solution.
{
"email": "admin@tubely.com",
"password": "password"
}
jwtTokenvariable from response body
.token
Authorization: Bearer ${jwtToken}.[0].thumbnail_urlto contain
/assets/
Login to view solution
Using the Bootdev CLI
The Bootdev CLI is the only way to submit your solution for this type of lesson. We need to be able to run commands in your environment to verify your solution.
You can install it here. It's a Go program hosted on GitHub, so you'll need Go installed as well. Instructions are on the GitHub page.