-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Parse.File getData #780
Parse.File getData #780
Conversation
Codecov Report
@@ Coverage Diff @@
## master #780 +/- ##
=========================================
Coverage ? 92.01%
=========================================
Files ? 54
Lines ? 4908
Branches ? 1087
=========================================
Hits ? 4516
Misses ? 392
Partials ? 0
Continue to review full report at Codecov.
|
}; | ||
this._data = result.base64; | ||
return controller.saveBase64(this._name, newSource, options); | ||
}).then((res) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it isn't your code, but I'm surprised that this function doesn't always return a promise!
if !this._previousSave, then this wont return a promise and anything that then's this func will error.
maybe in practive there is always a previous state when this is called???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why thats there. Been there since the beginning of the SDK. But this always returns a Promise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want me to clean it up or leave it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definitely your call
the class could definitely use some factoring out in any number of places (base64 comma location stuff for instance), but your changes look good to me and it works as is.
Closes: #678
Adds similar functionality for
.getData()
function in the Parse SDK for Android and Parse SDK for PHPReturns base64 (not full base64 with
data:...
)