Skip to content

Commit d5aaa42

Browse files
committed
bug fix
1 parent 2316cd5 commit d5aaa42

File tree

4 files changed

+1
-8
lines changed

4 files changed

+1
-8
lines changed

src/Lighthouse/upload/buffer/browser.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export default async (blob: any, apiKey: string, mimeType = '') => {
1313
method: 'POST',
1414
body: formData,
1515
headers: {
16-
Encryption: 'false',
1716
'Mime-Type': mimeType,
1817
Authorization: token,
1918
},

src/Lighthouse/upload/files/browser.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
UploadFileReturnType,
66
DealParameters,
77
} from '../../../types'
8-
import file from '../../uploadEncrypted/encrypt/file'
98
import { fetchWithTimeout } from '../../utils/util'
109

1110
// eslint-disable-next-line @typescript-eslint/no-empty-function
@@ -16,7 +15,7 @@ export default async <T extends boolean>(
1615
uploadProgressCallback?: (data: IUploadProgressCallback) => void
1716
): Promise<{ data: UploadFileReturnType<T> }> => {
1817
try {
19-
const isDirectory = files.length === 1 && files[0].webkitRelativePath
18+
const isDirectory = [...files].some(file => file.webkitRelativePath)
2019
let endpoint = lighthouseConfig.lighthouseNode + `/api/v0/add?wrap-with-directory=false`
2120

2221
if(!isDirectory && files.length > 1) {
@@ -61,9 +60,6 @@ export default async <T extends boolean>(
6160
}
6261

6362
const responseText = await response.text()
64-
console.log(responseText)
65-
console.log(typeof(responseText))
66-
6763
return { data: JSON.parse(responseText) }
6864
} catch (error: any) {
6965
throw new Error(error?.message)

src/Lighthouse/upload/text/browser.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export default async (text: string, apiKey: string, name: string) => {
1616
body: formData,
1717
timeout: 7200000,
1818
headers: {
19-
Encryption: 'false',
2019
'Mime-Type': 'text/plain',
2120
Authorization: token,
2221
},

src/Lighthouse/upload/text/node.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export default async (text: string, apiKey: string, name: string) => {
1818
credentials: 'include',
1919
timeout: 7200000,
2020
headers: {
21-
Encryption: 'false',
2221
'Mime-Type': 'text/plain',
2322
Authorization: token,
2423
},

0 commit comments

Comments
 (0)