mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Fix multi-file dropzone upload issue causing bucket listing duplication (#5392)
This commit fixes the order of the functions inside the selectPrefix function due to the fact that, as multiple files were being uploaded, the resetObjects function (that clears the object list) ran repeatedly for each of these objects, right before the appendObjects function (that appends the objects being uploaded to the current list of objects) also ran for all of these objects. This caused all the objects in the bucket to be repeated in the list for the number of objects that were dragged into the dropzone.
This commit is contained in:
parent
12f67d47f1
commit
78a641fc6a
@ -400,7 +400,6 @@ export const listObjects = () => {
|
||||
export const selectPrefix = prefix => {
|
||||
return (dispatch, getState) => {
|
||||
const {currentBucket, web} = getState()
|
||||
dispatch(resetObjects())
|
||||
dispatch(setLoadPath(prefix))
|
||||
web.ListObjects({
|
||||
bucketName: currentBucket,
|
||||
@ -415,6 +414,7 @@ export const selectPrefix = prefix => {
|
||||
object.name = object.name.replace(`${prefix}`, '');
|
||||
return object
|
||||
})
|
||||
dispatch(resetObjects())
|
||||
dispatch(appendObjects(
|
||||
objects,
|
||||
res.nextmarker,
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user