|
|
@@ -29,7 +29,7 @@ public class DFSImageServiceImpl implements ImageService {
|
|
|
List<DBPicture> pictures = new ArrayList<DBPicture>();
|
|
|
for (File file : files) {
|
|
|
try {
|
|
|
- String fileUrl = fileClient.uploadImage(FileUtils.readFileToByteArray(file), file.length(),
|
|
|
+ String fileUrl = fileClient.upload(FileUtils.readFileToByteArray(file), file.length(),
|
|
|
FilenameUtils.getExtension(file.getName()), null);
|
|
|
pictures.add(new DBPicture(file.getName(), fileUrl, com.uas.platform.core.util.FileUtils.getImagePixel(file)));
|
|
|
} catch (Exception e) {
|
|
|
@@ -42,7 +42,7 @@ public class DFSImageServiceImpl implements ImageService {
|
|
|
@Override
|
|
|
public DBPicture save(File file) {
|
|
|
try {
|
|
|
- String fileUrl = fileClient.uploadImage(FileUtils.readFileToByteArray(file), file.length(),
|
|
|
+ String fileUrl = fileClient.upload(FileUtils.readFileToByteArray(file), file.length(),
|
|
|
FilenameUtils.getExtension(file.getName()), null);
|
|
|
return pictureRepository.save(new DBPicture(file.getName(), fileUrl, com.uas.platform.core.util.FileUtils.getImagePixel(file)));
|
|
|
} catch (IOException e) {
|
|
|
@@ -53,7 +53,7 @@ public class DFSImageServiceImpl implements ImageService {
|
|
|
|
|
|
@Override
|
|
|
public IPicture save(String fileName, byte[] fileBytes) {
|
|
|
- String fileUrl = fileClient.uploadImage(fileBytes, fileBytes.length, FilenameUtils.getExtension(fileName), null);
|
|
|
+ String fileUrl = fileClient.upload(fileBytes, fileBytes.length, FilenameUtils.getExtension(fileName), null);
|
|
|
return pictureRepository.save(new DBPicture(fileName, fileUrl, com.uas.platform.core.util.FileUtils.getImagePixel(fileBytes)));
|
|
|
}
|
|
|
|