FileService
Source: FileService.js:38
Service for file management operations. Handles file uploads, downloads, and storage logic.
Constructor
new FileService(): FileServiceInstance Methods
singleFileMiddleware(fileKey: string): _express.NextFunction
Generate a middleware for file upload
Parameters
fileKey(string)
Returns
_express.NextFunction— middleware function
clearProfilePictureFolder(
userId: UUID,
fileExtension: string,
): Promise.<void>
Remove the profile image of a specific user in the profile picture folder
Parameters
userId(UUID)fileExtension(string, default: null)
Returns
Promise.<void>
clearClubLogoFolder(
clubId: UUID,
fileExtension: string,
): Promise.<void>
Remove the club logo of a specific club in the club logo folder
Parameters
clubId(UUID)fileExtension(string, default: null)
Returns
Promise.<void>