-
-
Notifications
You must be signed in to change notification settings - Fork 735
Add new ParseFile constructors and update save method #115
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
Add new ParseFile constructors and update save method #115
Conversation
* @param contentType | ||
* The file's content type. | ||
*/ | ||
public ParseFile(String name, File file, String contentType) { |
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.
Is there any real reason we need to pass in name
since we can get it from File#getName()
?
/cc @nlutsenko since it looks like we have this constructor on iOS.
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.
We don't have this constructor on iOS.
Simply fileWithContentsAtPath:
, since you are right - we can get the file name by using the last path component.
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.
👍
Passing to @nlutsenko for API discussion |
Let's keep the constructors to just the following:
We can determine |
Will revise the constructor. I forget we can get the name from file:( |
LGTM, one nit |
632df8d
to
cbdf919
Compare
…pload_file_stream_api Add new ParseFile constructors and update save method
@wangmengyan95 updated the pull request. |
Support creating a ParseFile with File.
New apis:
public ParseFile(String name, File file, String contentType)
public ParseFile(File file)
public ParseFile(String name, File file)
public ParseFile(File file, String contentType)
Update
saveAsync()
to support upload with a File pointer.