|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<MediaType>
com.foxinmy.weixin4j.type.MediaType
public enum MediaType
上传的媒体类型
公众平台上传限制: 图片(image): 2MB,支持bmp/png/jpeg/jpg/gif格式 语音(voice):2MB,播放长度不超过60s,支持mp3/wma/wav/amr格式 视频(video):10MB,支持rm/rmvb/wmv/avi/mpg/mpeg/mp4格式 缩略图(thumb):64KB,支持JPG格式
企业号上传限制: 图片(image):1MB,支持bmp/png/jpeg/jpg/gif格式 语音(voice):2MB,播放长度不超过60s,支持mp3/wma/wav/amr格式 视频(video):10MB,支持rm/rmvb/wmv/avi/mpg/mpeg/mp4格式 普通文件(file):20MB
临时媒体文件在后台保存时间为3天,即3天后media_id失效
| Enum Constant Summary | |
|---|---|
file
|
|
image
|
|
news
|
|
thumb
|
|
video
|
|
voice
|
|
| Method Summary | |
|---|---|
MimeType |
getMimeType()
|
static MediaType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static MediaType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final MediaType image
public static final MediaType voice
public static final MediaType video
public static final MediaType thumb
public static final MediaType file
public static final MediaType news
| Method Detail |
|---|
public static MediaType[] values()
for (MediaType c : MediaType.values()) System.out.println(c);
public static MediaType valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic MimeType getMimeType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||