mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Merge pull request #872 from deltachat/issue-854
Attachments with spaces in file name are not handled correctly #854
This commit is contained in:
@@ -179,6 +179,7 @@ public class ApplicationDcContext extends DcContext {
|
||||
|
||||
private String checkMime(String path, String mimeType) {
|
||||
if(mimeType == null || mimeType.equals("application/octet-stream")) {
|
||||
path = path.replaceAll(" ", "");
|
||||
String extension = MimeTypeMap.getFileExtensionFromUrl(path);
|
||||
String newType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
|
||||
if(newType != null) return newType;
|
||||
|
||||
Reference in New Issue
Block a user