i.e. if createeadStream, it will cause exception. After switching to readFileSync, it works now.
` // 2. upload inputFile
const inputFileNameOSS = `${new Date().toISOString().replace(/[-
T:\.Z]/gm, '').substring(0,
14)}_input_${_path.basename(req.file.originalname)}`; // avoid overriding
try {
//let contentStream = _fs.createReadStream(req.file.path);
let fileContent = _fs.readFileSync(req.file.path);
await new ForgeAPI.ObjectsApi().uploadObject(bucketKey,
inputFileNameOSS, req.file.size, fileContent, {}, req.oauth_client,
req.oauth_token);
}
from SO post: https://stackoverflow.com/questions/72420952/forge-design-automation-revit-tutorial-error
In current version, the tutorial uses version 0.8.5 of Forge SDK (https://www.npmjs.com/package/forge-apis). if upgrading to 0.9.0, the exception will occur at
https://github.com/Autodesk-Forge/learn.forge.designautomation/blob/nodejs/routes/DesignAutomation.js#L508-L511
i.e. if createeadStream, it will cause exception. After switching to readFileSync, it works now.
` // 2. upload inputFile
`