Closed hoangdangduy closed 2 years ago
Thanks for filing this issue!
Unfortunately the upload endpoint does not currently support non-ASCII filenames. (That's a limitation on the Google Photos Library API, not just this client library.) This is definitely something we would like to address. We don't have a timeframe for this yet, but I'll update this issue as soon as I have any updates.
Apologies for not closing this earlier, but this issue was actually addressed a few releases ago.
Filenames should now be specified as part of the call to batchCreateMediaItems(..)
. You should specify the filename as part of the NewMediaItem
, which supports unicode. Also refer to the upload media guide for more details.
Here's an example:
NewMediaItem newMediaItem = NewMediaItemFactory
.createNewMediaItem(uploadToken, fileName, itemDescription);
List<NewMediaItem> newItems = Arrays.asList(newMediaItem);
BatchCreateMediaItemsResponse response = photosLibraryClient.batchCreateMediaItems(newItems);
My video file has name "xin chào các bạn.MP4". I set file name and description also are text "xin chào các bạn" but when I see information video on web interface it is error font. If I upload direct from browser it still show name right.
Check on web interface![qa google photo client java 1](https://user-images.githubusercontent.com/8912039/52658715-50140080-2f2e-11e9-9649-e42afbdcfa13.png)
Code I use to set file name and description of video. Also use variable fileName![qa google photo client java 2](https://user-images.githubusercontent.com/8912039/52658720-52765a80-2f2e-11e9-920e-12d744458e5c.png)
Is it the library's fault? Please check!