mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-09 00:30:16 -06:00
Co-authored-by: Jessica Sachs <jess@jessicasachs.io> Co-authored-by: Barthélémy Ledoux <bart@cypress.io> Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com> Co-authored-by: Zach Bloomquist <github@chary.us> Co-authored-by: Dmitriy Kovalenko <dmtr.kovalenko@outlook.com> Co-authored-by: ElevateBart <ledouxb@gmail.com> Co-authored-by: Ben Kucera <14625260+Bkucera@users.noreply.github.com>
17 lines
292 B
JavaScript
17 lines
292 B
JavaScript
const rp = require('@cypress/request-promise')
|
|
const { fs } = require('./util/fs')
|
|
|
|
module.exports = {
|
|
send (pathToFile, url) {
|
|
return fs
|
|
.readFileAsync(pathToFile)
|
|
.then((buf) => {
|
|
return rp({
|
|
url,
|
|
method: 'PUT',
|
|
body: buf,
|
|
})
|
|
})
|
|
},
|
|
}
|