用常量
This commit is contained in:
parent
50a7c2e9c4
commit
46f6532164
@ -4,4 +4,5 @@ public class StorageConstant {
|
||||
public static final String VLOG_PATH = "vlog";
|
||||
public static final String VIDEO_PIECE_PATH = "source_video";
|
||||
public static final String PHOTO_PATH = "source_photo";
|
||||
public static final String PHOTO_WATERMARKED_PATH = "photo_w";
|
||||
}
|
||||
|
@ -40,6 +40,8 @@ import java.util.concurrent.LinkedBlockingQueue;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static com.ycwl.basic.constant.StorageConstant.PHOTO_WATERMARKED_PATH;
|
||||
|
||||
|
||||
@Component
|
||||
@EnableScheduling
|
||||
@ -138,8 +140,8 @@ public class ImageWatermarkTask {
|
||||
log.error("process error", e);
|
||||
return;
|
||||
}
|
||||
url = adapter.uploadFile(watermarkedFile, "photo_w", watermarkedFile.getName());
|
||||
adapter.setAcl(StorageAcl.PUBLIC_READ, "photo_w", watermarkedFile.getName());
|
||||
url = adapter.uploadFile(watermarkedFile, PHOTO_WATERMARKED_PATH, watermarkedFile.getName());
|
||||
adapter.setAcl(StorageAcl.PUBLIC_READ, PHOTO_WATERMARKED_PATH, watermarkedFile.getName());
|
||||
} catch (ImageWatermarkException e) {
|
||||
// 不支持
|
||||
url = sourceEntity.getUrl();
|
||||
|
Loading…
x
Reference in New Issue
Block a user