-
Notifications
You must be signed in to change notification settings - Fork 477
FormUpload With InputStream #416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| * @throws QiniuException | ||
| * @throws IOException | ||
| */ | ||
| public Response put(InputStream inputStream, String key, String token) throws QiniuException, IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得这个不需要,已经有一个类似的函数签名了:
public Response put(InputStream stream, String key, String token, StringMap params, String mime) throws QiniuException
让这个调用 put(inputStream, -1, key, token, params, mime, false);
这个带inputStream 和 size的函数 应当是最基本的 函数
那些传递file,filepath等参数的函数都可以调用它。因为file和filepath都可以转化为inputstream且都能知道size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,去掉
| * @throws QiniuException | ||
| * @throws IOException | ||
| */ | ||
| public Response put(InputStream inputStream, long size, String key, String token) throws QiniuException, IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个暂时不需要
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,去掉
| @@ -0,0 +1,73 @@ | |||
| package test.com.qiniu.storage; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个test2很怪,能不能合并到test1里?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已合并
1.表单上传增加方法 putWithForm,支持带inputStream上传
2.增加FormUploadTest2测试类
3.修改StreamingTest类,使测试通过
4.增加IOUtils类,用于inputStream转byte[]
4.修复已知问题