|
@@ -28,6 +28,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.io.InputStream;
|
|
|
+import java.util.UUID;
|
|
|
|
|
|
@Slf4j
|
|
|
@RestController
|
|
@@ -199,7 +200,8 @@ public class KuaiShouMaterialUploadController {
|
|
|
if (Check.isNull(oauthToken)) {
|
|
|
return Result.error("未获取到账户信息");
|
|
|
}
|
|
|
- String fileName = accountId + "_" + System.currentTimeMillis() + "_" + file.getOriginalFilename();
|
|
|
+ String[] split = file.getOriginalFilename().split("\\.");
|
|
|
+ String fileName = accountId + System.currentTimeMillis() + UUID.randomUUID().toString().replace("-", "").substring(0, 5) + "." + split[1];
|
|
|
InputStream inputStream = null;
|
|
|
try {
|
|
|
inputStream = file.getInputStream();
|