Streaming simultaneously can result in all kinds of problems due differences in speed and reliablility between a disk and network connection. So if you can, buffer the data for the write to S3. Maybe you could just stream to S3 from the file after you've written it?
If you must stream simultaneously, don't try any magic with pipedinputstream. Just use: (with-open [in (open-input) file (open-file) s3 (open-s3)] (copy-multi in [file s3])) And beware that if someone pulls the network plug during the operation, the file will not be fully written either. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en