From 7429ec169ac7583a6dae97e692d1a00ca82180f7 Mon Sep 17 00:00:00 2001 From: Ara Yeressian Date: Fri, 26 Jun 2020 21:22:28 +0400 Subject: [PATCH] fixed request --- dist/index.js | 2 +- src/uploader.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 33c4ac7..859c616 100644 --- a/dist/index.js +++ b/dist/index.js @@ -9739,7 +9739,7 @@ function uploadFile(entry, storageName, accessKey) { const readStream = fs_1.default.createReadStream(entry.fullPath); core_1.info(`Deploying ${entry.path}`); return node_fetch_1.default(`https://storage.bunnycdn.com/${storageName}/${entry.path}`, { - method: 'POST', + method: 'PUT', headers: { "AccessKey": accessKey, }, diff --git a/src/uploader.ts b/src/uploader.ts index a194a85..d696c05 100644 --- a/src/uploader.ts +++ b/src/uploader.ts @@ -7,7 +7,7 @@ function uploadFile(entry: readdirp.EntryInfo, storageName: string, accessKey: s const readStream = fs.createReadStream(entry.fullPath); info(`Deploying ${entry.path}`); return fetch(`https://storage.bunnycdn.com/${storageName}/${entry.path}`, { - method: 'POST', + method: 'PUT', headers: { "AccessKey": accessKey, },