🧹 chore: Add Back Agent-Specific File Retrieval and Deletion Permissions

This commit is contained in:
Danny Avila 2025-07-25 21:42:59 -04:00
parent ff54cbffd9
commit 7e7e75714e
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
2 changed files with 107 additions and 8 deletions

View file

@ -561,7 +561,7 @@ const processAgentFileUpload = async ({ req, res, metadata }) => {
text,
bytes,
// TODO: OCR images support?
images,
images: _i,
filename,
filepath: ocrFileURL,
} = await uploadOCR({ req, file, loadAuthValues });
@ -753,9 +753,6 @@ const processOpenAIImageOutput = async ({ req, buffer, file_id, filename, fileEx
const currentDate = new Date();
const formattedDate = currentDate.toISOString();
const _file = await convertImage(req, buffer, undefined, `${file_id}${fileExt}`);
// Determine the correct source for the assistant
const source =
req.body.endpoint === EModelEndpoint.azureAssistants ? FileSources.azure : FileSources.openai;
// Create only one file record with the correct information
const file = {