nodetube
nodetube copied to clipboard
BACKBLAZE_HOST_URL ?
Hello what do i have to put at BACKBLAZE_HOST_URL https://bucketname.s3.us-west-001.backblazeb2.com/ or s3.eu-central-003.backblazeb2.com
i keep getting this error Uncaught Exception: Error: bucket 05662bb3f3... could not be found
ok got it
BACKBLAZE_BUCKET is bucket name instead of bucket id
You were able to get it working? Sorry there's not a ton of docs rn
@kgnfth yes but it still tries to locate the file from the local folder
if i set SAVE_AND_SERVE_FILES='false'
it doesnt upload to B2 but it will save the file to uploads folder
and it doesnt display the file from the browser
if i set SAVE_AND_SERVE_FILES='true'
it does upload to B2 and local uploads folder
but i dont want it to save it to the local folder
i thought it would serve the files from the bucket
@kgnfth do you have UPLOAD_TO_B2 set to true? Probably have to change UPLOAD_SERVER too.
@kgnfth
It's not a good idea to share variables from .env.private by the way.
@kgnfth thos where stripped out soo not too worry
So i have to change like this UPLOAD_SERVER=s3.eu-central-003.backblazeb2.com ?
im not an expert but i think based on this code
uploadServer = https://${process.env.UPLOAD_SERVER}.${domainNameAndTLD}/uploads;
UPLOAD_SERVER=s3.eu-central-003.backblazeb2.com is right
this is what i get
<div class="display-div">
<a href="s3.eu-central-003.backblazeb2.com/deejavu/4TScUOF.jpeg">
<img class="display-element" src="s3.eu-central-003.backblazeb2.com/deejavu/4TScUOF.jpeg">
</a>
</div>
using thing env
- SAVE_AND_SERVE_FILES=false
- UPLOAD_TO_B2=true
- MAX_RATING_ALLOWED=SENS
- DOMAIN_NAME_AND_TLD=https://tube.gocloud.fun
- BACKBLAZE_HOST_URL=s3.eu-central-003.backblazeb2.com
- BACKBLAZE_ACCOUNT_ID=0035
- BACKBLAZE_APP_KEY=K003
- BACKBLAZE_BUCKET=nodetubetest
- SESSION_SECRET=d54fwefwe45fwef45
- UPLOAD_SERVER=s3.eu-central-003.backblazeb2.com
- SAVE_AND_SERVE_FILES_DIRECTORY=https://s3.eu-central-003.backblazeb2.com
Look at bottom left

Correct url to the file is https://f003.backblazeb2.com/file/nodetubetest/deejavu/4TScUOF.jpeg
Is it the link to the file on the actual upload server though?
@BassOfBass yes its here https://f003.backblazeb2.com/file/nodetubetest/deejavu/4TScUOF.jpeg
I assume the file was uploaded from your nodetube instance, right? So backend is not a problem.
@BassOfBass it uploads correctly but the serve url is wrong if u need to test it i can provide you B2 creds
@BassOfBass @mayeaux
Okey finally i made it work
the correct settings are like this
- SAVE_AND_SERVE_FILES=false
- UPLOAD_TO_B2=true
- DOMAIN_NAME_AND_TLD=https://tube.gocloud.fun
- BACKBLAZE_HOST_URL= #this does not need a value but why ?
- BACKBLAZE_ACCOUNT_ID=5
- BACKBLAZE_APP_KEY=0
- BACKBLAZE_BUCKET=nodetubetest
- SESSION_SECRET=d54
- UPLOAD_SERVER=https://f003.backblazeb2.com/file/nodetubetest
- SAVE_AND_SERVE_FILES_DIRECTORY=s3.eu-central-003.backblazeb2.com
but the importer still uses local folder
Okay thanks for this @kgnfth I'll consult this when writing up the docs for Backblaze. And yeah importer would need a bit of a touch up to add the uploading to backblaze function. I can show you what code to copy and where if you'd like to submit a PR for that. Thanks also for the help @BassOfBass
@mayeaux If you could point me in the right direction I could take a crack at it.
@l1ghtsword
Check SAVE_AND_SERVE_FILES and SAVE_AND_SERVE_FILES_DIRECTORY variables and why they aren't disabled when BACKBLAZE_ variables are enabled. I guess you should also check the behaviour of UPLOAD_URL and UPLOAD_SERVER just in case.
The files to shuffle through:
lib\helpers\settings.jscontrollers\backend\internalApi.jscontrollers\backend\uploading.jslib\uploading\ffmpeg.jslib\uploading\backblaze.js