Function “lmb_simplefileUpload()”

Estimated reading: 1 minute
insert_file(string $filepath,string $filename,num $level,bool $noupload,string $dublicate);

Function that prepares and calls the upload of a file



The path from which the file should be uploaded


The name of the file


The path level (ID of the folder)


  • 0: The upload must take place in the browser
  • 1: The upload from within a file is possible


Possibilities of what should happen to a duplicate file

  • overwrite: The new file overwrites the old file
  • rename: The new file is renamed, new name with ascending number
  • versioning: The old file is versioned
  • skip: The new file is not uploaded


The file should be linked to a data record from another table -> array m format array(‘gtabid’=>1,’fieldid’=>2,’datid’=>3)