Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug Report: Backblaze stores 2 files for each upload #3694

Open
2 tasks done
rossanmol opened this issue Aug 16, 2022 · 11 comments
Open
2 tasks done

馃悰 Bug Report: Backblaze stores 2 files for each upload #3694

rossanmol opened this issue Aug 16, 2022 · 11 comments
Assignees
Labels
bug Something isn't working product / storage Fixes and upgrades for the Appwrite Storage.

Comments

@rossanmol
Copy link

馃憻 Reproduction steps

  1. Setup backblaze vars in .env
  2. Upload a file in Appwrite Storage
  3. Open backblaze bucket
  4. Notice the file upload

馃憤 Expected behavior

1 file is uploaded to backblaze

馃憥 Actual Behavior

2 files are uploaded to backblaze, 1 original file and a weird file with same name.

馃幉 Appwrite version

Version 0.15.x

馃捇 Operating system

MacOS

馃П Your Environment

image

Screenshot for the double files

馃憖 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

馃彚 Have you read the Code of Conduct?

@rossanmol rossanmol added the bug Something isn't working label Aug 16, 2022
@stnguyen90 stnguyen90 added the product / storage Fixes and upgrades for the Appwrite Storage. label Aug 16, 2022
@JoshiJoshiJoshi
Copy link

I can confirm this bug on my end. It looks like Appwrite is uploading the file twice to the backblaze server.
One is encrypted and the other one isn't.
My backblaze server is located in EU Central and I'm using the default bucket settings:
Encryption: disabled
Files: Private


@JoshiJoshiJoshi
Copy link

I had the suspicion that it was also downloading all the files twice. So I tested it by downloading the files through the admin console a few times and it seems to confirm my suspicion. On my end I only received one file but I guess the backblaze adapter is downloading 2 files in the background.


@stnguyen90
Copy link
Contributor

@rossanmol and @JoshiJoshiJoshi, what are your encryption and anti virus settings on the bucket? What are your anti virus settings from the .env file?

@JoshiJoshiJoshi
Copy link

@stnguyen90 both settings are enabled in the appwrite console, but the anti virus is actually disabled in the .env file.
Screenshot 2022-08-23 at 23 20 43@2x
Screenshot 2022-08-23 at 23 19 28@2x

Disabling them doesn't make a difference. In fact, if you disable "Encryption" it still uploads two files and one is still encrypted.

@stnguyen90
Copy link
Contributor

@JoshiJoshiJoshi that seems quite odd that it's still encrypted. 馃憖 Are you sure you clicked on save? Does viewing the bucket JSON show encryption is false?

@JoshiJoshiJoshi
Copy link

@stnguyen90 I double checked it before posting it because I found it weird as well 馃槈
Screenshot 2022-08-24 at 08 25 09@2x

Restarted the docker container and issue still persist.
Tested file types: jpeg, png, pdf, zip, tar.gz

@stnguyen90
Copy link
Contributor

@JoshiJoshiJoshi, actually, I have a feeling it's gzipped rather than encrypted:

$compressor = new GZIP();
$data = $compressor->compress($data);

@JoshiJoshiJoshi
Copy link

@stnguyen90 doesn't look like I can open it if it's just gzipped

@stnguyen90
Copy link
Contributor

@JoshiJoshiJoshi, did decompress it fail?

@JoshiJoshiJoshi
Copy link

@stnguyen90 indeed, none of the files can be decompressed. Besides that, all the files which can't be openend are actually bigger than the actual file, so I kinda doubt it's just gzipped.

@JoshiJoshiJoshi
Copy link

@stnguyen90 @everly-gif File Upload/Download initiation and speed is a lot slower compared to other storage adapters. It takes appwrite several seconds to upload a file to Backblaze and download also takes several seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / storage Fixes and upgrades for the Appwrite Storage.
Projects
None yet
Development

No branches or pull requests

4 participants