removeFileFromUserUploads()

This function is vital for deleting files, offering efficient data management by facilitating controlled removal of specified files. Its versatility extends across applications, ensuring streamlined data maintenance and optimized storage resources.

Example:

import { createBackendFunction, utils } from '@magicjs.dev/backend';

export default createBackendFunction(async function (fileName: string) {
    return utils.removeFileFromUserUploads('/', fileName);
});

Click here to refer GitHub.

Last updated