javasdk怎么上传文件到某个bucket下的某个目录?
回2楼huangjinshe的帖子
我将key值设置为 /upload/image/aaa.txt
出现错误 错误代码
[Error Code]:SignatureDoesNotMatch, [Message]:The request signature we calculated does not match the signature you provided. Check your key and signing method.
at com.aliyun.openservices.oss.internal.OSSExceptionFactory.create(OSSExceptionFactory.java:15)
at com.aliyun.openservices.oss.internal.OSSErrorResponseHandler.handle(OSSErrorResponseHandler.java:39)
at com.aliyun.common.comm.ServiceClient.handleResponse(ServiceClient.java:284)
at com.aliyun.common.comm.ServiceClient.sendRequestImpl(ServiceClient.java:177)
at com.aliyun.common.comm.ServiceClient.sendRequest(ServiceClient.java:136)
at com.aliyun.openservices.oss.internal.OSSOperation.send(OSSOperation.java:60)
at com.aliyun.openservices.oss.internal.OSSObjectOperation.putObject(OSSObjectOperation.java:76)
at com.aliyun.openservices.oss.OSSClient.putObject(OSSClient.java:303)
at com.eeline.util.FileUtil.uploadFile(FileUtil.java:85)
at com.eeline.util.FileUtil.writeFile(FileUtil.java:34)
at com.eeline.action.weixin.MatterManagerAction.addMatter(MatterManagerAction.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:252)
at org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
赞0
踩0