<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Backblaze on Haseeb Majid</title>
    <link>https://haseebmajid.dev/tags/backblaze/</link>
    <description>Recent content in Backblaze on Haseeb Majid</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 26 Dec 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://haseebmajid.dev/tags/backblaze/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>TIL: How to Connect PocketBase and BackBlaze S3</title>
      <link>https://haseebmajid.dev/posts/2022-12-26-til-how-to-connect-pocketbase-and-backblaze-s3/</link>
      <pubDate>Mon, 26 Dec 2022 00:00:00 +0000</pubDate>
      
      <guid>https://haseebmajid.dev/posts/2022-12-26-til-how-to-connect-pocketbase-and-backblaze-s3/</guid>
      <description>&lt;p&gt;&lt;strong&gt;TIL: How to Connect PocketBase and BackBlaze S3&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;By default PocketBase uses the local file system to store uploaded files. If you have limited disk space, you could optionally connect to a S3 compatible storage. - PocketBase&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;why-backblaze-&#34;&gt;Why BackBlaze ?&lt;/h2&gt;
&lt;p&gt;Simple the prices are generally cheaper as compared with other S3 compatible storage platforms.
How can we set up BackBlaze as our S3 bucket to store uploaded files such as user avatars?&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p><strong>TIL: How to Connect PocketBase and BackBlaze S3</strong></p>
<blockquote>
<p>By default PocketBase uses the local file system to store uploaded files. If you have limited disk space, you could optionally connect to a S3 compatible storage. - PocketBase</p>
</blockquote>
<h2 id="why-backblaze-">Why BackBlaze ?</h2>
<p>Simple the prices are generally cheaper as compared with other S3 compatible storage platforms.
How can we set up BackBlaze as our S3 bucket to store uploaded files such as user avatars?</p>
<h2 id="backblaze">BackBlaze</h2>
<p>Go to <code>BackBlaze</code></p>
<ul>
<li>Create an account</li>
<li>Create a new bucket
<ul>
<li>You should be able to make it public or private</li>
</ul>
</li>
</ul>
<p><img
        loading="lazy"
        src="/posts/2022-12-26-til-how-to-connect-pocketbase-and-backblaze-s3/images/bucket.png"
        type=""
        alt="Bucket"
        
      /></p>
<ul>
<li>Take note of the <code>endpoint</code> i.e. <code>s3.us-west-004.backblazeb2.com</code>.</li>
<li>Then go to <code>App Keys</code>
<ul>
<li>Create a new <code>Application key</code></li>
</ul>
</li>
</ul>
<p></p>
<ul>
<li>Take note of the <code>keyID</code> and <code>applicationKey</code></li>
</ul>
<h2 id="pocketbase">PocketBase</h2>
<p>Go to your PocketBase instance:</p>
<ul>
<li>Go to Settings</li>
<li>Go to File storage</li>
</ul>
<p>Add the following details</p>
<ul>
<li>In <code>ENDPOINT</code> add the endpoint above <code>https://s3.us-west-004.backblazeb2.com</code></li>
<li><code>BUCKET</code> is the name of the bucket we created before <code>ArticleTest</code></li>
<li><code>REGION</code> you can find in the URL <code>us-west-004</code></li>
<li><code>ACCESS KEY</code> is the <code>keyID</code> above</li>
<li><code>SECRET</code> is the <code>applicationKey</code> above</li>
</ul>
<p>Then click <code>Save changes</code> and you should see <code>S3 connected successfully</code>.</p>
<p>That&rsquo;s It!</p>
]]></content:encoded>
    </item>
    
  </channel>
</rss>
