mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-23 07:39:52 -06:00
19 lines
342 B
CoffeeScript
19 lines
342 B
CoffeeScript
fs = require("fs-extra")
|
|
r = require("request")
|
|
rp = require("request-promise")
|
|
Promise = require("bluebird")
|
|
|
|
fs = Promise.promisifyAll(fs)
|
|
|
|
module.exports = {
|
|
send: (pathToFile, url) ->
|
|
fs
|
|
.readFileAsync(pathToFile)
|
|
.then (buf) ->
|
|
rp({
|
|
url: url
|
|
method: "PUT"
|
|
body: buf
|
|
})
|
|
}
|