createSrc function is used for reading the uploaded file.

Here is an example:


import { createUploader, createSrc } from '';
import getFileServer from './get-file.server'; // The backend server function for reading files

const fileSrc = createSrc(getFileServer);

return (
    <img src={fileSrc.getLink('fileName.jpg')} alt="File Preview" />

Backend get-file.server

import { createBackendFunction, utils } from '';

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

Click here to refer GitHub.

Last updated