readFileFromUserUploads()

This function is used to save a file from the user to the folder named user-uploads.

Example:

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

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

An example of the usage is given in the createSrc() section.

Click here to refer GitHub.

Last updated