fix: handle media download interruptions
This commit is contained in:
1 parent
e6d23afd58
commit
eda7312388
1 file changed
+1
-1
+1
-1
@@ -287,7 +287,7 @@ public class AsyncProviderClient {
|
|||||||
out.write("\r\n".getBytes(java.nio.charset.StandardCharsets.UTF_8));
|
out.write("\r\n".getBytes(java.nio.charset.StandardCharsets.UTF_8));
|
||||||
}
|
}
|
||||||
|
|
||||||
private MediaBytes downloadMedia(String value) throws IOException {
|
private MediaBytes downloadMedia(String value) throws IOException, InterruptedException {
|
||||||
URI uri = URI.create(value);
|
URI uri = URI.create(value);
|
||||||
if (!"https".equalsIgnoreCase(uri.getScheme()) || uri.getHost() == null || uri.getUserInfo() != null) {
|
if (!"https".equalsIgnoreCase(uri.getScheme()) || uri.getHost() == null || uri.getUserInfo() != null) {
|
||||||
throw new ApiException("INVALID_MEDIA_URL", "媒体地址必须是可公开访问的 HTTPS URL", 400);
|
throw new ApiException("INVALID_MEDIA_URL", "媒体地址必须是可公开访问的 HTTPS URL", 400);
|
||||||
|
|||||||
Reference in new issue
Block a user