Skip to content

Commit 9158a07

Browse files
committed
Fixing box and nyckel
1 parent b6a68ad commit 9158a07

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

components/box/actions/upload-file-version/upload-file-version.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default {
5555
const {
5656
file, fileId, createdAt, modifiedAt, fileName, parentId,
5757
} = this;
58-
const data = this.getFileUploadBody({
58+
const data = await this.getFileUploadBody({
5959
file,
6060
createdAt,
6161
modifiedAt,

components/box/actions/upload-file/upload-file.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default {
4747
const {
4848
file, createdAt, modifiedAt, fileName, parentId,
4949
} = this;
50-
const data = this.getFileUploadBody({
50+
const data = await this.getFileUploadBody({
5151
file,
5252
createdAt,
5353
modifiedAt,

components/box/common/common-file-upload.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import FormData from "form-data";
22
import utils from "./utils.mjs";
33

4-
export function getFileUploadBody({
4+
export async function getFileUploadBody({
55
file,
66
createdAt,
77
modifiedAt,
@@ -10,7 +10,7 @@ export function getFileUploadBody({
1010
}) {
1111
const {
1212
fileMeta, fileContent,
13-
} = utils.getFileData(file);
13+
} = await utils.getFileData(file);
1414
const attributes = fileMeta.attributes;
1515
if (createdAt && utils.checkRFC3339(createdAt)) {
1616
attributes.content_created_at = createdAt;

components/nyckel/actions/classify-image/classify-image.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default {
4646
const response = await this.nyckel.invokeFunction({
4747
$,
4848
functionId: this.functionId,
49-
...this.getImageData(),
49+
...(await this.getImageData()),
5050
params: {
5151
labelCount: this.labelCount,
5252
includeMetadata: this.includeMetadata,

components/nyckel/actions/extract-text-from-image/extract-text-from-image.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default {
2828
const response = await this.nyckel.extractTextFromImageUrl({
2929
$,
3030
functionId: this.functionId,
31-
...this.getImageData(),
31+
...(await this.getImageData()),
3232
params: {
3333
includeRegions: this.includeRegions,
3434
},

0 commit comments

Comments
 (0)