Skip to content

Commit 17353d6

Browse files
committed
; charset=utf-8
1 parent 739c665 commit 17353d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<dependency id="cordova-plugin-file" version="6.0.2"/>
1717
<platform name="android">
1818
<framework src="androidx.work:work-runtime:2.7.1" />
19-
<framework src="com.squareup.okhttp3:okhttp:4.3.1" />
19+
<framework src="com.squareup.okhttp3:okhttp:4.9.3" />
2020
<framework src="androidx.room:room-runtime:2.4.2" />
2121
<framework src="src/android/config.gradle" custom="true" type="gradleReference"/>
2222
<config-file target="res/xml/config.xml" parent="/*">

src/android/UploadTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ private Request createRequest() throws FileNotFoundException {
328328

329329
// Build file reader
330330
String extension = MimeTypeMap.getFileExtensionFromUrl(filepath);
331-
MediaType mediaType = MediaType.parse(MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension));
331+
MediaType mediaType = MediaType.parse(MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension) + "; charset=utf-8");
332332
File file = new File(filepath);
333333
ProgressRequestBody fileRequestBody = new ProgressRequestBody(mediaType, file.length(), new FileInputStream(file), this::handleProgress);
334334

0 commit comments

Comments
 (0)