Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asyncListObjects Bug & Fix #66

Open
Kuhne1 opened this issue Sep 2, 2019 · 0 comments
Open

asyncListObjects Bug & Fix #66

Kuhne1 opened this issue Sep 2, 2019 · 0 comments

Comments

@Kuhne1
Copy link

Kuhne1 commented Sep 2, 2019

The options on the asyncListObjects is broken on ios(Haven't tested on android)
All the options update the delimiter parameter on getBucket object instead of marker, prefix, maxKeys.

Please see the issue below.

File: ios/RNAliyunOSS+OBJECT.m

Current --> RCT_REMAP_METHOD
OLD CODE

if([options objectForKey:@"delimiter"]) {
    getBucket.delimiter = [options objectForKey:@"delimiter"];
}

if([options objectForKey:@"marker"]) {
    getBucket.delimiter= [options objectForKey:@"marker"]; 
}

if([options objectForKey:@"prefix"]) {
    getBucket.delimiter = [options objectForKey:@"prefix"];
}

if([options objectForKey:@"maxkeys"]) {
    getBucket.delimiter = [options objectForKey:@"maxkeys"];
}

Fixed code below
NEW CODE

if([options objectForKey:@"delimiter"]) {
    getBucket.delimiter = [options objectForKey:@"delimiter"];
}

if([options objectForKey:@"marker"]) {
    getBucket.marker = [options objectForKey:@"marker"]; //getBucket.marker
}

if([options objectForKey:@"prefix"]) {
    getBucket.prefix = [options objectForKey:@"prefix"]; //getBucket.prefix
}

if([options objectForKey:@"maxkeys"]) {
    getBucket.maxKeys = [options objectForKey:@"maxkeys"]; //getBucket.maxKeys
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant