Sunday, November 22, 2020

Sharex Upload to backblaze B2 and Using Cloudflare as CDN


what we want

  • a simple and relyable way to take care of your daily screenshot/screenshare/fileshare foo
  • I'm assuming sharex is already in use as I will not go through capture and processing parts of it, just the upload and actual share
  • leverage our own domain-name in the sharing link

what we do

  1. find out your BB details and spawn the filebucket create api credentials

  2. setup sharex and upload a file to reveal our backblaze details

  3. setup the domain

  4. setup a worker script to utilize cdn and shorten our url

    1. BackBlaze

    create a Bucket that publicly accessible give it a namethat makes sense 

    enter image description here

    create api credentials for sharex with read/write permissions to that bucket 

    enter image description here

    2. ShareX

    setup a new destination from thepresets and put the credentials we just received

    enter image description here

    set it up as your default and upload a testfile to see if the credentials work and have sufficiant permissions

    if that all worked head back to BB2 and check the filedetails of the upload as it will reveal the hostname we need for our dns setup withing cloudflare

    I put the interesting parts in red -> is our cname hostname

    enter image description here

    3. CloudFlare DNS setup

    head over to cloudflare and setup a cname record that points to backblaze, something like this enter image description here



No comments:

YouTube Channel