|
|
@@ -49,6 +49,7 @@ import javax.imageio.stream.ImageInputStream;
|
|
|
import java.awt.image.BufferedImage;
|
|
|
import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
+import java.net.MalformedURLException;
|
|
|
import java.net.URL;
|
|
|
import java.nio.file.Files;
|
|
|
import java.nio.file.Path;
|
|
|
@@ -1114,7 +1115,10 @@ public class MidjourneyServiceImpl implements MidjourneyService {
|
|
|
conversation.setAction("UPLOAD");
|
|
|
conversation.setUserId(user.getId());
|
|
|
conversation.setStatus("SUCCESS");
|
|
|
- conversation.setImageUrl(jsonObject.getJSONArray("result").getStr(0));
|
|
|
+ String result = jsonObject.getJSONArray("result").getStr(0);
|
|
|
+ URL url = new URL(result);
|
|
|
+ url = new URL(url.getProtocol(), "cdn.mj.liuliangbang.vip", url.getPort(), url.getFile());
|
|
|
+ conversation.setImageUrl(url.toString());
|
|
|
conversationMapper.insert(conversation);
|
|
|
return conversation;
|
|
|
}
|