Skip to content

File controller - helper functions throws error in kotahi

While trying to make use of the createFile helper function was receiving errors and it did not work as expected. On debugging further below are the errors identified.

Screenshot_from_2022-02-10_10-52-37

Screenshot_from_2022-02-10_09-44-27

Screenshot_from_2022-02-09_20-43-59

After debugging the issue it seems the imports logger and useTransaction were failing with errors.

Logger and useTranasction Imports on updating them with

const logger = require('@pubsweet/logger')
const useTransaction = require('../../useTransaction')

solves the above issues and below is a working screenshot

Screenshot_from_2022-02-09_21-06-57

Duplicated my current working branch with the above issue in here file-server-helper-function-issue