@zeph-to/hook-sdk 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/zeph-hook.js +2 -2
- package/package.json +1 -1
package/dist/zeph-hook.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.ZephHook = void 0;
|
|
|
4
4
|
const errors_js_1 = require("./errors.js");
|
|
5
5
|
const DEFAULT_BASE_URL = 'https://api.zeph.to/v1';
|
|
6
6
|
const DEFAULT_TIMEOUT_MS = 30_000;
|
|
7
|
-
const BODY_FILE_THRESHOLD =
|
|
7
|
+
const BODY_FILE_THRESHOLD = 0;
|
|
8
8
|
const PREVIEW_LENGTH = 200;
|
|
9
9
|
const inferMimeType = (fileName) => {
|
|
10
10
|
const ext = fileName.split('.').pop()?.toLowerCase();
|
|
@@ -62,7 +62,7 @@ class ZephHook {
|
|
|
62
62
|
async uploadToS3(url, content, contentType) {
|
|
63
63
|
const response = await fetch(url, {
|
|
64
64
|
method: 'PUT',
|
|
65
|
-
headers: { 'Content-Type': contentType },
|
|
65
|
+
headers: { 'Content-Type': `${contentType}; charset=utf-8` },
|
|
66
66
|
body: content,
|
|
67
67
|
signal: AbortSignal.timeout(this.timeoutMs),
|
|
68
68
|
});
|