Commit Graph

6 Commits

Author SHA1 Message Date
dandds
4ec85a11f1 because of bug LIBCLOUD-931, write file downloads to tempfile 2018-09-07 09:44:48 -04:00
dandds
0391348b5d basic task order pdf downloads 2018-09-07 09:44:48 -04:00
Patrick Smith
501caf767b Upload with a temp file instead of streaming
Using a stream is a no-go due to a bug in libcloud: https://issues.apache.org/jira/browse/LIBCLOUD-935?focusedCommentId=16152982&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16152982

Instead, write the uploaded file to a named tempfile and pass that to
the uploader.
2018-08-29 10:40:04 -04:00
Patrick Smith
4e16346ed4 Don't verify hash of uploaded files
I believe this is a bug in `libcloud`. We're passing an iterator (as
required by libcloud --
https://github.com/apache/libcloud/blob/trunk/libcloud/storage/base.py#L592)
for the stream, but when verifying the hash of the uploaded file,
  `libcloud` goes through the stream twice: https://github.com/apache/libcloud/blob/trunk/libcloud/storage/base.py#L614-L621

After the sending the file stream as an upload, when generating the
hash, the iterator has already been iterated through so the second
go-through returns an empty iterator. Thus, the hash will never match
unless an empty file is uploaded.

This change reaches into the container's driver so that we can pass the
`verify_hash` kwarg, which cannot be specified on the container's
methods.
2018-08-28 20:35:31 -04:00
Montana
cfe9b7589e Formatting 2018-08-27 13:08:02 -04:00
dandds
ef2e97713a initial uploader and some form work 2018-08-27 13:04:41 -04:00