tus / tusd

Reference server implementation in Go of tus: the open protocol for resumable file uploads
https://tus.github.io/tusd
MIT License
3.09k stars 480 forks source link

Unable to upload files using azurite with tusd. || azurestore: unable to create InfoHandler file: #1200

Closed numanshaikh25 closed 1 month ago

numanshaikh25 commented 1 month ago

Describe the bug When using Azurite for testing tusd locally as an azure emulator the files are not being uploaded as the .info file gives the below issue

azurestore: unable to create InfoHandler file:
-> github.com/Azure/azure-storage-blob-go/azblob.newStorageError, /Users/username/go/pkg/mod/github.com/!azure/azure-storage-blob-go@v0.14.0/azblob/zc_storage_error.go:42
===== RESPONSE ERROR (ServiceCode=InvalidResourceName) =====
Description=
, Details: 
   : 

   Code: 

   PUT http://127.0.0.1:10000/mycontainer/afafdf556f967995b934e1a0701b8dfb.info?timeout=61
   Authorization: REDACTED
   Content-Length: [308]
   User-Agent: [Azure-Storage/0.14 (go1.21.3; darwin)]
   X-Ms-Blob-Cache-Control: []
   X-Ms-Blob-Content-Disposition: []
   X-Ms-Blob-Content-Encoding: []
   X-Ms-Blob-Content-Language: []
   X-Ms-Blob-Content-Type: []
   X-Ms-Blob-Type: [BlockBlob]
   X-Ms-Client-Request-Id: [e44a2cd0-d4a5-46cd-5d62-db30cff39064]
   X-Ms-Date: [Mon, 07 Oct 2024 09:31:54 GMT]
   X-Ms-Version: [2020-04-08]
   --------------------------------------------------------------------------------
   RESPONSE Status: 400 The specified resource name contains invalid characters.
   Access-Control-Allow-Credentials: [true]
   Access-Control-Allow-Headers: [*]
   Access-Control-Allow-Methods: [*]
   Access-Control-Allow-Origin: [*]
   Connection: [keep-alive]
   Content-Type: [application/xml]
   Date: [Mon, 07 Oct 2024 09:31:54 GMT]
   Server: [nginx/1.27.1]
   X-Ms-Error-Code: [InvalidResourceName]
   X-Ms-Request-Id: [59d114c6-05fd-4275-aa35-8d6187ae8ed3]

To Reproduce Steps to reproduce the behavior:

  1. Execute command tusd -azure-storage=my-test-container -azure-endpoint=https://my-custom-endpoint.com
  2. Start upload using tus-js-client
  3. See error

Expected behavior A clear and concise description of what you expected to happen.

Setup details Please provide following details, if applicable to your situation:

Acconut commented 1 month ago

Does it work if you follow the instructions at https://tus.github.io/tusd/storage-backends/azure-blob-storage/#testing-with-azurite?

numanshaikh25 commented 1 month ago

I have tried those instructions does not work with that as well.

Acconut commented 1 month ago

That's odd. Does the same happen if you do not use Nginx in front of Azurite and tusd contacts Azurite directly?

numanshaikh25 commented 1 month ago

It was a problem with Nginx thanks!