Skip to content

Cannot download object if its name contains a % sign #2547

@Savageman

Description

@Savageman

Hello 👋

I have an object named my%20file.txt (not my file.txt!).
Unfortunately, If I do objects.Download(storageClient, containerName, "my%20file.txt", nil) I get a 404...

In order to be able to download the file I need to use "my%2520file.txt" (note the % was changed to %25).

The Download documentation doesn't mention anything about it: https://pkg.go.dev/github.com/gophercloud/gophercloud/openstack/objectstorage/v1/objects#Download

But in the library I'm using in another language, if I pass ['objectName' => 'my%20file.txt'] it returns 200 OK.

I see 2 possible fixes:

  1. Update the doc
  2. (breaking change) being able to download file with the correct name without having to encode it manually

Thanks for your attention :)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions