Closed cwillems closed 7 years ago
Please provide an example url for testing.
Hmm, the problem is a bit more complicated. These symbols are not allowed in an URL and have to be encoded. But I cannot encode the whole URL and also not the whole path after the host. Therefore I have to know where these symbols can appear for all Chinese platforms.
Until now the chinese string only appears in the name of video file.
The best solution would be to not use these characters at all in an URL. They cause problems across the whole app, because they are not allowed in URLs.
I would have to define provider specific encoding rules. E.g. your openUNE example needs an encoding after the last slash, but this rule breaks Vimeo URLs for openHPI and openSAP. openHPIcn still works, but are there any Chinese characters somewhere used? And what about cnMOOChouse? I need an exact schema on which platform these characters can appear at which place of the URL. Without I cannot guarantee that we perhaps end up with invalid URLs.
I think this not only applies to the video player, but files in general. I could image that the video download/offline playback also breaks.
I would suggest for a convention (or maybe even a file upload validation) in the admin backend, that restricts chinese letters... @shls do you think, this is acceptable for chinese customers?
I also would prefer to fix this on the backend side. The URLs are provided by the API, and I think we should ensure that our API delivers valid URLs only. If not, we have to fix this at every client for every URL usage.
Video URL which only can be edited by admin:
General file:
From my perspective, It is painful for chinese user/customers if they can not use chinese when adding video URL or uploading file.
How about the backend automatically renaming files - at least those which are uploaded in the backend? For video files, there must be a convention, as long as we don't upload those via the platform...
Now on openhpi.cn, as far as I know, when I upload one general file, it will be renamed with file ID which is generated by our platform. The method make it possible to download file via desktop browser. Am I right? For android user, if our platform already renamed the general file, it should be downloadable.
Regarding the video URL, I can help to forward your solution, if they only use English in the filename and URL. The video can be downloadable and used as offline video.
Of course, If you are willing to integrate qiniu service in our platform, I am happy to provide the API manual.
originally reported by Sheng Luo