dutchcoders / transfer.sh

Easy and fast file sharing from the command-line.
https://github.com/dutchcoders/transfer.sh
MIT License
15.3k stars 1.54k forks source link

provider-storj: Getting error 'not found' for every uploaded file #521

Open anaschaudhary33 opened 1 year ago

anaschaudhary33 commented 1 year ago

I have setup storj as provider. I can successfully upload the file, (I can verify the uploaded file in the storj bucket) but when I open the output url it giving me error 'Not found'. Log

 [transfer.sh]2022/12/28 06:16:09 Error metadata: EOF
 [transfer.sh]2022/12/28 06:16:08 Getting file 62bc21edb1deb.mp4.metadata from Storj Bucket
[transfer.sh]2022/12/28 06:16:04 47.31.141.30:0 - - [2022-12-28T06:16:04Z] "PUT /62bc21edb1deb.mp4 HTTP/1.1" 200  "https://*******.sh/"; "Mozilla/5.0 (Android 11; Mobile; rv:108.0) Gecko/108.0 Firefox/108.0"
 [transfer.sh]2022/12/28 06:15:51 Uploading file 62bc21edb1deb.mp4 to Storj Bucket
 [transfer.sh]2022/12/28 06:15:51 Uploading Bdm5IY 62bc21edb1deb.mp4 11009799 
 [transfer.sh]2022/12/28 06:15:51 Uploading file 62bc21edb1deb.mp4.metadata to Storj Bucket
stefanbenten commented 1 year ago

Could it be that your access grant does not allow list/download/deletes? Did you try listing the bucket and downloading the file using the same access grant?

anaschaudhary33 commented 1 year ago

I have recheck(using uplink cli) that the access grant is able to list+download+delete. I have also changed the access grant after verifying it's able to list+download+delete, but the error remains same.

stefanbenten commented 1 year ago

Do you see both files in the bucket? There should be the raw file and the .metadata file. The above suggests, that the metadata file isnt there. @anaschaudhary33

anaschaudhary33 commented 1 year ago

Both filename and filename.metadata are present in the storj bucket.

stefanbenten commented 1 year ago

Would you mind sharing the setup details (without the secrets of course)? Command line arguments would help to double check. I just setup a test instance and it works as expected..

anaschaudhary33 commented 1 year ago

I have deployed docker image through northflank.com.

  1. Setup deployment source as dutchcoders/transfer.sh:latest.
  2. Setup runtime variables $PROVIDER $STORJ_ACCESS and $STORJ_BUCKET
  3. Runtime command is /go/bin/transfersh --listener :8080
  4. expose port 8080 to public
anaschaudhary33 commented 1 year ago

Tried similar setup with fly.io but no luck.

dillfrescott commented 1 year ago

Same error for me using storj

dillfrescott commented 1 year ago

Both the file and the metadata file are in the bucket too

dillfrescott commented 1 year ago

Ok it has to do with the docker version. I ran it from the binary and it works fine...

aspacca commented 1 year ago

@dillfrescott so we can close the issue, do we?

stefanbenten commented 1 year ago

Lemme troubleshoot it when i get some spare cycles. I cannot see why docker would do something different..

aspacca commented 1 year ago

@dillfrescott , @stefanbenten I had the same problem while testing #535

see my comment at https://github.com/dutchcoders/transfer.sh/pull/535#issuecomment-1454942106

I will try to reproduce with docker before and after #535 being merged

dillfrescott commented 1 year ago

Okay