Skip to content
This repository has been archived by the owner on Mar 14, 2018. It is now read-only.

pickingDidError called twice when fail to send #30

Open
ghost opened this issue Aug 1, 2017 · 0 comments
Open

pickingDidError called twice when fail to send #30

ghost opened this issue Aug 1, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Aug 1, 2017

When the app is put offline (airplane mode), try to send a Photo from Camera make the delegate method pickingDidError being called two time

We figured out why, it's quite simple issue:

  • file involved: FSPicker/FSPicker/Platforms/iOS/API/FSUploader.m
  • Fixe: (line 406) comment the line : [self messageDelegateWithBlob:blob error:error];
[filestack store:itemData withOptions:storeOptions progress:^(NSProgress *uploadProgress) {
    if (delegateRespondsToUploadProgress) {
        [self.uploadModalDelegate fsUploadProgress:uploadProgress.fractionCompleted addToTotalProgress:NO];
    }
} completionHandler:^(FSBlob *blob, NSError *error) {
    // Fix: this method is already called bellow
    // [self messageDelegateWithBlob:blob error:error];

    if (blob) {
        [self messageDelegateLocalUploadFinished];
    } else {
        [self messageDelegateWithBlob:nil error:error];
    }

    if (delegateRespondsToUploadProgress) {
        [self.uploadModalDelegate fsUploadProgress:1.0 addToTotalProgress:NO];
    }
}];
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants