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

Parse.File getData #780

Merged
merged 3 commits into from
Apr 4, 2019
Merged

Parse.File getData #780

merged 3 commits into from
Apr 4, 2019

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Apr 2, 2019

Closes: #678

Adds similar functionality for .getData() function in the Parse SDK for Android and Parse SDK for PHP

Returns base64 (not full base64 with data:...)

@codecov
Copy link

codecov bot commented Apr 2, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@ba6c448). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #780   +/-   ##
=========================================
  Coverage          ?   92.01%           
=========================================
  Files             ?       54           
  Lines             ?     4908           
  Branches          ?     1087           
=========================================
  Hits              ?     4516           
  Misses            ?      392           
  Partials          ?        0
Impacted Files Coverage Δ
src/ParseFile.js 97.51% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ba6c448...23bc45d. Read the comment docs.

@dplewis dplewis requested a review from acinader April 2, 2019 22:28
};
this._data = result.base64;
return controller.saveBase64(this._name, newSource, options);
}).then((res) => {
Copy link
Contributor

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???

Copy link
Member Author

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.

Copy link
Member Author

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?

Copy link
Contributor

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.

@dplewis dplewis merged commit 2f098a5 into master Apr 4, 2019
@dplewis dplewis deleted the file-getData branch April 4, 2019 00:23
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

Successfully merging this pull request may close these issues.

2 participants