apps-android-commons
apps-android-commons copied to clipboard
Caption with trailing whitespace leads to failed upload (titleblacklist-custom-space)
Latest master.
Steps:
- Upload any picture.
- At the caption step, enter a name with a space at the end.
- The upload seems to be starting fine, but at the end it fails with the logcat error
titleblacklist-custom-space
.
@nicolas-raoul Hi, can I work on this issue?
@Jiaweeeeeen Yes thanks! :-) Did you manage to reproduce the issue?
@nicolas-raoul I haven't reproduced the issue. Is it the same step you provide above?
Yes, it might take a few attempts in various situations.
I think the solution could be to add a method in UploadMediaDetailInputFilter.java
to check the trailing whitespace in the caption field. Then in the filter
, if the input text has any trailing whitespace, simply remove it. I'm going to implement these methods and hope the solution works.
Unfortunately, this solution doesn’t work because any empty space the user types is recognized as trailing space. Instead, I have another solution to remove them after the user typed the caption. Any trailing whitespace will be removed when set to uploadMediaDetails
.