Browse Source

下载、上传传入bucket名称

dengsixing 3 years ago
parent
commit
bcbb39589a

+ 1 - 1
4dkankan-common-utils/src/main/java/com/fdkankan/common/util/CreateObjUtil.java

@@ -601,7 +601,7 @@ public class CreateObjUtil {
 		log.info("删除/mnt/data/下的数据完毕:" + command);
 	}
 
-	public static void ossUtilCp(String fileUrl , String path) throws Exception{
+	public static void ossUtilCp(String bucket, String fileUrl , String path) throws Exception{
 		String command = ConstantCmd.OSS_UTIL_CP + " " + fileUrl + " " + path;
 		Long start = System.currentTimeMillis();
 		log.info("开始oss下载文件:" + command);

+ 1 - 1
4dkankan-utils-fyun/src/main/java/com/fdkankan/fyun/oss/UploadToOssUtil.java

@@ -135,7 +135,7 @@ public class UploadToOssUtil {
 	 * @param filePath
 	 * @param key
 	 */
-	public void uploadBySh(String filePath, String key) {
+	public void uploadBySh(String bucket, String filePath, String key) {
 		String ossPath = this.bucket + "/" + key;
 		try {
 			String command = String.format(UploadToOssUtil.UPLOAD_SH, ossPath, filePath);