1
0
mirror of synced 2026-10-18 21:48:31 +08:00

🆕 #4105 【视频号】增加微信小店商家客服接口

This commit is contained in:
Binary Wang
2026-08-22 20:56:47 +08:00
committed by GitHub
parent 5bb9deeb5d
commit 0122878b14
14 changed files with 594 additions and 1 deletions

View File

@@ -78,7 +78,27 @@ public class CommonUploadParam implements Serializable {
*/
@SneakyThrows
public static CommonUploadParam fromBytes(String name, @Nullable String fileName, byte[] bytes) {
return new CommonUploadParam(name, new CommonUploadData(fileName, new ByteArrayInputStream(bytes), bytes.length), null);
return new CommonUploadParam(name, new ByteArrayUploadData(fileName, bytes), null);
}
private static class ByteArrayUploadData extends CommonUploadData {
private final byte[] bytes;
private ByteArrayUploadData(@Nullable String fileName, byte[] bytes) {
super(fileName, new ByteArrayInputStream(bytes), bytes.length);
this.bytes = bytes;
}
@Override
public ByteArrayInputStream getInputStream() {
return new ByteArrayInputStream(bytes);
}
@Override
public byte[] readAllBytes() {
return bytes.clone();
}
}
/**