mirror of
https://github.com/minio/minio.git
synced 2025-11-21 10:16:03 -05:00
browser: fix file uploads with '#' in the name (#11261)
When the file name or the prefix contains `#`, whatever comes after is ingored. This is fixed by encoding the object path using encodeURIComponent. Fixes #11112
This commit is contained in:
@@ -138,9 +138,10 @@ describe("Uploads actions", () => {
|
||||
objects: { currentPrefix: "pre1/" }
|
||||
})
|
||||
store.dispatch(uploadsActions.uploadFile(file))
|
||||
const objectPath = encodeURIComponent("pre1/file1")
|
||||
expect(open).toHaveBeenCalledWith(
|
||||
"PUT",
|
||||
"https://localhost:8080/upload/test1/pre1/file1",
|
||||
"https://localhost:8080/upload/test1/" + objectPath,
|
||||
true
|
||||
)
|
||||
expect(send).toHaveBeenCalledWith(file)
|
||||
|
||||
Reference in New Issue
Block a user