-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add multer s3 * add types multer s3 * update multer s3 implementation * Revert "update multer s3 implementation" This reverts commit 9a25bf5. * update storage utils * update multer storage type on routes * revert getMulterStorage * revert getMulterStorage * update getmulterstorage * update getmulterstorage * update getmulterstorage
- Loading branch information
1 parent
15d06ec
commit d60242c
Showing
19 changed files
with
289 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
import express from 'express' | ||
import multer from 'multer' | ||
import attachmentsController from '../../controllers/attachments' | ||
import { getUploadPath } from '../../utils' | ||
import { getMulterStorage } from '../../utils' | ||
|
||
const router = express.Router() | ||
|
||
const upload = multer({ dest: getUploadPath() }) | ||
|
||
// CREATE | ||
router.post('/:chatflowId/:chatId', upload.array('files'), attachmentsController.createAttachment) | ||
router.post('/:chatflowId/:chatId', getMulterStorage().array('files'), attachmentsController.createAttachment) | ||
|
||
export default router |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
import express from 'express' | ||
import multer from 'multer' | ||
import openaiAssistantsController from '../../controllers/openai-assistants' | ||
import { getUploadPath } from '../../utils' | ||
import { getMulterStorage } from '../../utils' | ||
|
||
const router = express.Router() | ||
const upload = multer({ dest: getUploadPath() }) | ||
|
||
router.post('/download/', openaiAssistantsController.getFileFromAssistant) | ||
router.post('/upload/', upload.array('files'), openaiAssistantsController.uploadAssistantFiles) | ||
router.post('/upload/', getMulterStorage().array('files'), openaiAssistantsController.uploadAssistantFiles) | ||
|
||
export default router |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
import express from 'express' | ||
import multer from 'multer' | ||
import predictionsController from '../../controllers/predictions' | ||
import { getUploadPath } from '../../utils' | ||
import { getMulterStorage } from '../../utils' | ||
|
||
const router = express.Router() | ||
|
||
const upload = multer({ dest: getUploadPath() }) | ||
|
||
// CREATE | ||
router.post(['/', '/:id'], upload.array('files'), predictionsController.getRateLimiterMiddleware, predictionsController.createPrediction) | ||
router.post( | ||
['/', '/:id'], | ||
getMulterStorage().array('files'), | ||
predictionsController.getRateLimiterMiddleware, | ||
predictionsController.createPrediction | ||
) | ||
|
||
export default router |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
import express from 'express' | ||
import multer from 'multer' | ||
import vectorsController from '../../controllers/vectors' | ||
import { getUploadPath } from '../../utils' | ||
import { getMulterStorage } from '../../utils' | ||
|
||
const router = express.Router() | ||
|
||
const upload = multer({ dest: getUploadPath() }) | ||
|
||
// CREATE | ||
router.post( | ||
['/upsert/', '/upsert/:id'], | ||
upload.array('files'), | ||
getMulterStorage().array('files'), | ||
vectorsController.getRateLimiterMiddleware, | ||
vectorsController.upsertVectorMiddleware | ||
) | ||
router.post(['/internal-upsert/', '/internal-upsert/:id'], upload.array('files'), vectorsController.createInternalUpsert) | ||
router.post(['/internal-upsert/', '/internal-upsert/:id'], getMulterStorage().array('files'), vectorsController.createInternalUpsert) | ||
|
||
export default router |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.