Commit 291e6037 by v_vdywang

wdy

parent af919a7b
......@@ -31,7 +31,8 @@ public class utilupload {
public void doUpload(String ossurl,String endpoint,String accessKeyId,String bucketName,String filedir,String objectName,String encodePolicy,String signature) throws Exception {
URL httpurl = new URL(ossurl);
File file = new File("/tmp/temporaryfile.jpg");
localFilePath="/tmp/temporaryfile" + ossurl.substring(ossurl.lastIndexOf("."),ossurl.length());
File file = new File(localFilePath);
FileUtils.copyURLToFile(httpurl, file);
this.objectName=filedir+"/"+objectName;
this.endpoint=endpoint;
......
-------------------------------------------------------------------------------
Test set: com.example.aliossjava.AliossJavaApplicationTests
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.245 s - in com.example.aliossjava.AliossJavaApplicationTests
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.428 s - in com.example.aliossjava.AliossJavaApplicationTests
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment