-
Notifications
You must be signed in to change notification settings - Fork 148
Support in library for multiple public shares per file #163
Conversation
…e method and there's no name
…blic share is created
|
|
||
| private static final String PARAM_NAME = "name"; | ||
| private static final String PARAM_PASSWORD = "password"; | ||
| private static final String PARAM_EXPIRATION_DATE = "expireDate"; |
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.
Not important, but this variable value could be expirationDate
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.
Not really, 'expireDate' is the name determined by the OCS Share API for the header, we need to use exactly that.
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.
Yeah, you're right
| } else if (mExpirationDateInMillis > 0) { | ||
| // set expiration date | ||
| DateFormat dateFormat = new SimpleDateFormat(FORMAT_EXPIRATION_DATE); | ||
| DateFormat dateFormat = new SimpleDateFormat(FORMAT_EXPIRATION_DATE, Locale.GERMAN); |
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.
German 🇩🇪 🍺 ? Should it not be Locale.getDefault()?
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.
Locale.getDefault() would build something based in the language selection in the device. This date is not to be shown to the user, but to send to the server, so we must be sure of using a set of symbols appropriate. Could have been other country, just chose one I expected not to fail. I don't know how Chinese of Japanese or Cyrillic locales would affect to the format, so I just avoided getDefault() and bet on safe :)
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.
👍
…patibility of the operation with servers not supporting 'name' property in shares
…lic shares" This reverts commit 6d0773c.
No description provided.