Skip to content

Commit 5a20c5f

Browse files
committed
Define general mime type and file name
1 parent 393cc7e commit 5a20c5f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/java/com/pengrad/telegrambot/request/BaseRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ public boolean isMultipart() {
4646
}
4747

4848
public String getFileName() {
49-
return "file.txt";
49+
return ContentTypes.GENERAL_FILE_NAME;
5050
}
5151

5252
public String getContentType() {
53-
return "application/x-www-form-urlencoded";
53+
return ContentTypes.GENERAL_MIME_TYPE;
5454
}
5555
}

src/main/java/com/pengrad/telegrambot/request/ContentTypes.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ abstract public class ContentTypes {
1818
public static final String VIDEO_FILE_NAME = "file.mp4";
1919
public static final String VOICE_FILE_NAME = "file.ogg";
2020

21+
public static final String GENERAL_MIME_TYPE = "application/x-www-form-urlencoded";
22+
public static final String GENERAL_FILE_NAME = DOC_FILE_NAME;
2123
}

0 commit comments

Comments
 (0)