Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(plugin-fm): fix cos path error #4537

Merged
merged 1 commit into from
May 31, 2024
Merged

fix(plugin-fm): fix cos path error #4537

merged 1 commit into from
May 31, 2024

Conversation

mytharcher
Copy link
Contributor

Description

When set path, upload cause error.

Steps to reproduce

  1. Create a COS storage with path like "abc".
  2. Create a file collection use the COS storage.
  3. Upload a file to the file collection.

Expected behavior

File uploaded.

Actual behavior

Error thrown.

app_1  | TypeError [ERR_INVALID_ARG_TYPE]: The "cb" argument must be of type function. Received undefined
app_1  |     at makeCallback (node:fs:185:3)
app_1  |     at Object.unlink (node:fs:1863:14)
app_1  |     at COSStorage._removeFile (/app/nocobase/node_modules/@nocobase/plugin-file-manager/dist/node_modules/multer-cos/index.js:36:5610)
app_1  |     at WriteStream.<anonymous> (/app/nocobase/node_modules/@nocobase/plugin-file-manager/dist/node_modules/multer-cos/index.js:36:5413)
app_1  |     at WriteStream.emit (node:events:531:35)
app_1  |     at WriteStream.emit (node:domain:488:12)
app_1  |     at emitErrorNT (node:internal/streams/destroy:169:8)
app_1  |     at emitErrorCloseNT (node:internal/streams/destroy:128:3)
app_1  |     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
app_1  |   code: 'ERR_INVALID_ARG_TYPE'
app_1  | }

Related issues

lanbosm/multer-COS#1

Reason

Destination configuration different with other vendors.

Solution

Fix storage configuration.

Copy link

height bot commented May 31, 2024

This pull request has been linked to 1 task:

💡Tip: Add "Close T-4415" to the pull request title or description, to a commit message, or in a comment to mark this task as "Done" when the pull request is merged.

Copy link

Tests results for "E2E"

13 flaky ⚠️ [chromium] › plugins/@nocobase/plugin-workflow/src/client/__e2e__/conditionNode/continueWhenYesFormulaEngine.test.ts:276:5 › Collection event Add Data Trigger, Formula engine, determines that the trigger node single line text field variable is not equal to an unequal constant, passes.
⚠️ [chromium] › core/client/src/modules/variable/__e2e__/basic.test.ts:14:7 › variables › linkage rules of table view action
⚠️ [chromium] › plugins/@nocobase/plugin-action-print/src/client/__e2e__/schemaInitailizer.test.ts:14:7 › ReadPrettyFormActionInitializers & CalendarFormActionInitializers should add print action › print action in ReadPrettyFormActionInitializers
⚠️ [chromium] › plugins/@nocobase/plugin-action-bulk-update/src/client/__e2e__/schemaInitailizer.test.ts:14:7 › TableActionInitializers & GanttActionInitializers & MapActionInitializers › TableActionInitializers should add bulk update
⚠️ [chromium] › plugins/@nocobase/plugin-workflow/src/client/__e2e__/conditionNode/BranchIntoYesAndNoFormulaEngine.test.ts:29:5 › Collection event Add Data Trigger, determines that the trigger node single line text field variable is equal to an equal constant, passes.
⚠️ [chromium] › core/client/src/modules/blocks/data-blocks/form/__e2e__/form-create/dragAndDrop.test.ts:12:5 › fields
⚠️ [chromium] › core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaSettings1.test.ts:92:9 › table block schema settings › enable drag and drop sorting › enable drag and drop sorting
⚠️ [chromium] › plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/schemaSettings.test.ts:14:7 › bulk edit action setting › data will be updated && edit form configure
⚠️ [chromium] › plugins/@nocobase/plugin-auth/src/client/__e2e__/auth.test.ts:21:7 › auth › register
⚠️ [chromium] › plugins/@nocobase/plugin-file-manager/src/client/__e2e__/createLocalStorage.test.ts:15:7 › file manager › add new local storage
⚠️ [chromium] › core/client/src/modules/blocks/data-blocks/list/__e2e__/schemaInitializer.test.ts:29:7 › where list block can be added › popup
⚠️ [chromium] › plugins/@nocobase/plugin-action-bulk-edit/src/client/__e2e__/schemaInitailizer.test.ts:14:7 › TableActionInitializers & GanttActionInitializers & MapActionInitializers should add bulk edit action › bulk edit in TableActionInitializers
⚠️ [chromium] › plugins/@nocobase/plugin-data-source-main/src/client/__e2e__/fields/manyToOne/schemaSettings2.test.ts:22:7 › form item & edit form › supported options

974 passed, 29 skipped
✔️✔️✔️

Full HTML report. Merge workflow run.

@mytharcher mytharcher merged commit ccef72c into main May 31, 2024
22 of 23 checks passed
@mytharcher mytharcher deleted the T-4415 branch May 31, 2024 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant