import { Injectable } from '@nestjs/common';

@Injectable()
export class UploadService {
  async processUploadedFile(file: Express.Multer.File) {
    // Add more business logic here. Example:
    // - Save file info to database
    // - Call other services to process file (Tika text extraction, ES indexing etc.)
    // - Validate file format or analyze content

    // Currently only return basic file info
    return {
      filename: file.filename,
      originalname: file.originalname,
      size: file.size,
      mimetype: file.mimetype,
      path: file.path, // After Multer saves file, full path is in file.path
    };
  }
}
