Uploading file Not Working when file name contains Arabic numbers or characters
See original GitHub issueUploading file Not Working when file name contains Arabic numbers or characters. Please help me this is urgent!
fun attachMessageFile(attachRequest: AttachRequest, upload: UploadProgressListener?): Single<AttachMessageResponse> {
return Rx2AndroidNetworking.upload(ApiEndPoints.ATTACH_FILE)
.addHeaders(apiHeader)
.addMultipartFile("file", attachRequest.file, ";charset=utf-8")
.setContentType(";charset=utf-8")
.addMultipartParameter("duration", attachRequest.duration)
.addMultipartParameter("chat_id", attachRequest.chatId.toString())
.addMultipartParameter("type", attachRequest.type.toString())
.setPriority(Priority.HIGH)
.build()
.setUploadProgressListener(upload)
.getParseSingle(object : TypeToken<AttachMessageResponse>() {})
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Uploading file Not Working when file name contains Arabic ...
Uploading file Not Working when file name contains Arabic numbers or characters. Please help me this is urgent!
Read more >When uploading Arabic files in Spring, filename ends up with ...
It's likely Spring which has transformed Unicode characters (at least, the non-ISO-8859-1 characters) into XML entities.
Read more >File.getName() and File.list() can't read arabic????
It works fine except for one thing: files that have their names in arabic show up as question marks or other strange characters....
Read more >Filename encoding and interoperability problems
Unfortunately, it's still possible that files uploaded / downloaded this way can have interoperability problems, for a number of reasons unrelated to gsutil....
Read more >Uploading Files and Images - Caspio Online Help
Displaying and Downloading Files in Apps. When File fields are included on results or details pages of DataPages you have separate options for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m one of your course Advanced Android Development members, I really enjoy it and please help me with this. We have the same problem as described our file name is “photo_۲۲۲.jpg” Please help us with solving this.
Also had this problem, fixed it and sent a pull request #563 before it is committed to the main branch you can use this:
Add the dependency
implementation 'com.github.MansourM:Fast-Android-Networking:1.0.3'
add encoding to your file uploads like this
.addMultipartFile(KEY, FILE, CONTENT_TYPE, "utf-8")