filestack / FSPicker

DEPRECATED
MIT License
10 stars 15 forks source link

StoreOptions.path being ignored #7

Closed Johnnycon closed 8 years ago

Johnnycon commented 8 years ago

Hi -

I'm getting uploads working full round-trip, but having one small issue. The path option seems to be ignored when I upload a file. When I inspect the blob object in the delegate method

- (void)fsPicker:(FSPickerController *)picker didFinishedPickingMediaWithBlobs:(NSArray<FSBlob *> *)blobs

I also see that path is nil. The file successfully uploads to s3, but always uploads to the root of my s3 container.

Here is the relevant pieces of code.

    FSConfig *config = [[FSConfig alloc] initWithApiKey:@"key_removed"];

    FSStoreOptions *storeOptions = [[FSStoreOptions alloc] init];
    storeOptions.location = FSStoreLocationS3;
    storeOptions.path = @"uploads/";

    config.storeOptions = storeOptions;
    config.selectMultiple = NO;
    config.sources = @[FSSourceCameraRoll, FSSourceCamera];

    FSTheme *theme = [FSTheme filestackTheme];

    FSPickerController *fsPickerController = [[FSPickerController alloc] initWithConfig:config theme:theme];
    fsPickerController.fsDelegate = self;

    [self presentViewController:fsPickerController animated:YES completion:nil];

Thanks - John

pJes2 commented 8 years ago

Hi @JohnnyCon please run pod update, it should update Filestack (not FSPicker) to version 0.3.1 and let me know if it is working for you.

Johnnycon commented 8 years ago

Confirmed that path is now being honored. Thanks!