Fix vector index
Browse files- data/knowledgebridge.db +0 -0
- server/document-routes.ts +3 -1
- server/routes.ts +9 -3
data/knowledgebridge.db
CHANGED
Binary files a/data/knowledgebridge.db and b/data/knowledgebridge.db differ
|
|
server/document-routes.ts
CHANGED
@@ -154,7 +154,9 @@ router.post('/upload', (req, res, next) => {
|
|
154 |
router.post('/process/:id', async (req, res) => {
|
155 |
try {
|
156 |
const documentId = parseInt(req.params.id);
|
157 |
-
const
|
|
|
|
|
158 |
|
159 |
const document = await storage.getDocument(documentId);
|
160 |
if (!document) {
|
|
|
154 |
router.post('/process/:id', async (req, res) => {
|
155 |
try {
|
156 |
const documentId = parseInt(req.params.id);
|
157 |
+
const requestBody = req.body || {};
|
158 |
+
const operations = requestBody.operations || ['extract_text'];
|
159 |
+
const indexName = requestBody.indexName;
|
160 |
|
161 |
const document = await storage.getDocument(documentId);
|
162 |
if (!document) {
|
server/routes.ts
CHANGED
@@ -1141,11 +1141,17 @@ Provide a brief, engaging explanation (2-3 sentences) that would be pleasant to
|
|
1141 |
}
|
1142 |
});
|
1143 |
|
1144 |
-
// Register document routes -
|
1145 |
-
const isDocumentUploadEnabled = process.env.
|
|
|
|
|
|
|
|
|
|
|
|
|
1146 |
|
1147 |
if (isDocumentUploadEnabled) {
|
1148 |
-
console.log('✅ Document uploads enabled');
|
1149 |
app.use("/api/documents", documentRoutes);
|
1150 |
} else {
|
1151 |
console.log('ℹ️ Document uploads disabled - using fallback routes');
|
|
|
1141 |
}
|
1142 |
});
|
1143 |
|
1144 |
+
// Register document routes - enable uploads by default, only disable if explicitly set
|
1145 |
+
const isDocumentUploadEnabled = process.env.DISABLE_UPLOADS !== 'true';
|
1146 |
+
|
1147 |
+
console.log('🔍 Environment check:', {
|
1148 |
+
NODE_ENV: process.env.NODE_ENV,
|
1149 |
+
DISABLE_UPLOADS: process.env.DISABLE_UPLOADS,
|
1150 |
+
isDocumentUploadEnabled
|
1151 |
+
});
|
1152 |
|
1153 |
if (isDocumentUploadEnabled) {
|
1154 |
+
console.log('✅ Document uploads enabled - full functionality available');
|
1155 |
app.use("/api/documents", documentRoutes);
|
1156 |
} else {
|
1157 |
console.log('ℹ️ Document uploads disabled - using fallback routes');
|