Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

Request: Add error property to FPMediaInfo #119

Open
newyorkpizza opened this issue Jan 6, 2016 · 0 comments
Open

Request: Add error property to FPMediaInfo #119

newyorkpizza opened this issue Jan 6, 2016 · 0 comments

Comments

@newyorkpizza
Copy link
Contributor

If an error occurs during media upload, there is no direct way for my app to detect that an error has occurred.

Instead, we infer that an error has occurred by checking the info parameter for the delegate method - (void)fpPickerController:(FPPickerController *)picker didFinishPickingMediaWithInfo:(FPMediaInfo *)info. If info.remoteURL, info.filename, or info.mediaType is nil, then we know that the upload was unsuccessful.

However, it would be cleaner if the FilePicker API were to explicitly indicate that an error has occurred. It would also be useful if the API returned the NSError.

A possible solution would be to add a new property to FPMediaInfo for an NSError. Then, the connection error could be set on mediaInfo, i.e.:

    mediaInfo.error = error;
    failure(error, mediaInfo);

at these two lines:

failure(error, mediaInfo);

failure(error, mediaInfo);

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

1 participant