Function
encodeFilePart
(boundary, type, name, filename)
Source from the content-addressed store, hash-verified
| 667 | } |
| 668 | |
| 669 | function encodeFilePart(boundary, type, name, filename) { |
| 670 | return [ |
| 671 | `--${boundary}\r\n`, |
| 672 | `Content-Disposition: form-data; name="${name}"; filename="${filename}"\r\n`, |
| 673 | `Content-Type: ${type}\r\n`, |
| 674 | '\r\n', |
| 675 | '' |
| 676 | ].join(''); |
| 677 | } |
| 678 | |
| 679 | exports.direct_upload = function direct_upload(callback_url, options = {}) { |
| 680 | let params = build_upload_params(extend({ |
Tested by
no test coverage detected