SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.
JavaScript a2aagentic-aiai-agentsdevtoolsmcp-clientn8n-alternativeno-codeopen-sourceorchestrationsmythosvisual-builder
fix multer multiupload
ahmedcoder01a3ce5da540f7
diff --git a/packages/app/src/backend/lib/multer-s3.ts b/packages/app/src/backend/lib/multer-s3.tsindex efdafc3e..fd970b02 100644--- a/packages/app/src/backend/lib/multer-s3.ts+++ b/packages/app/src/backend/lib/multer-s3.ts@@ -1,13 +1,13 @@// copy of: https://github.com/anacronw/multer-s3/blob/master/index.js// to add 'Tagging' to the upload for correct lifecycle management+import { DeleteObjectCommand } from '@aws-sdk/client-s3';+import { Upload } from '@aws-sdk/lib-storage';import crypto from 'crypto';-import stream from 'stream';import fileType from 'file-type';import htmlCommentRegex from 'html-comment-regex';import parallel from 'run-parallel';-import { Upload } from '@aws-sdk/lib-storage';-import { DeleteObjectCommand } from '@aws-sdk/client-s3';+import stream from 'stream';import util from 'util';function staticValue(value) {@@ -307,9 +307,16 @@ S3Storage.prototype._handleFile = function (req, file, cb) {params.ContentEncoding = opts.contentEncoding;}+ // Configure Upload with proper multipart settings for files > 5MB+ // partSize: 10MB (minimum is 5MB, maximum is 5GB)+ // queueSize: 4 concurrent part uploads+ // leavePartsOnError: false to clean up failed uploadsvar upload = new Upload({client: this.s3,params: params,+ queueSize: 4,+ partSize: 1024 * 1024 * 10, // 10MB per part+ leavePartsOnError: false,});upload.on('httpUploadProgress', function (ev) {