mirror of
https://github.com/minio/minio.git
synced 2025-01-12 15:33:22 -05:00
webUI: change listing to 1000 keys from browser UI (#11159)
gateway implementations do not handle maxKeys being `-1` properly unlike MinIO implementation, handle it by setting an appropriate value. fixes #11158
This commit is contained in:
parent
7b8a456f68
commit
45ea161f8d
@ -457,7 +457,7 @@ func (web *webAPIHandlers) ListObjects(r *http.Request, args *ListObjectsArgs, r
|
|||||||
// Fetch all the objects
|
// Fetch all the objects
|
||||||
for {
|
for {
|
||||||
// Let listObjects reply back the maximum from server implementation
|
// Let listObjects reply back the maximum from server implementation
|
||||||
result, err := core.ListObjects(args.BucketName, args.Prefix, nextMarker, SlashSeparator, 0)
|
result, err := core.ListObjects(args.BucketName, args.Prefix, nextMarker, SlashSeparator, 1000)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return toJSONError(ctx, err, args.BucketName)
|
return toJSONError(ctx, err, args.BucketName)
|
||||||
}
|
}
|
||||||
@ -571,8 +571,10 @@ func (web *webAPIHandlers) ListObjects(r *http.Request, args *ListObjectsArgs, r
|
|||||||
nextMarker := ""
|
nextMarker := ""
|
||||||
// Fetch all the objects
|
// Fetch all the objects
|
||||||
for {
|
for {
|
||||||
// Limit browser to defaults batches to be more responsive, scrolling friendly.
|
// Limit browser to '1000' batches to be more responsive, scrolling friendly.
|
||||||
lo, err := listObjects(ctx, args.BucketName, args.Prefix, nextMarker, SlashSeparator, -1)
|
// Also don't change the maxKeys value silly GCS SDKs do not honor maxKeys
|
||||||
|
// values to be '-1'
|
||||||
|
lo, err := listObjects(ctx, args.BucketName, args.Prefix, nextMarker, SlashSeparator, 1000)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &json2.Error{Message: err.Error()}
|
return &json2.Error{Message: err.Error()}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user