Joget DX Available for Download

Check out Joget DX, the next generation successor to Joget Workflow for faster, simpler digital transformation.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
import java.io.File;
import java.io.IOException;
import org.joget.apps.form.service.FileUtil;

String recordId = "ID-0001";
String tableName = "crm_contact";
String fileName = "profile_image.png";
 
//Get the uploaded file of a form data record
try {
    File profileImage = FileUtil.getFile(fileName, tableName, recordId);
}catch (IOException e) {}

Methods

Thai

กระบวนการ

checkAndUpdateFileName
public static void checkAndUpdateFileName(org.joget.apps.form.model.FormRowSet results, org.joget.apps.form.model.Element form, java.lang.String primaryKeyValue)

...

public static java.io.File getFile(java.lang.String fileName, org.joget.apps.form.model.Element form, java.lang.String primaryKeyValue) throws java.io.IOException

...

Thai

จัดเก็บไฟล์เพื่อกำหนดเป้าหมายไดเรกทอรีอัปโหลดของบันทึกข้อมูลฟอร์ม

getFile
public static java.io.File getFile(java.lang.String fileName, org.joget.apps.form.model.Element form, java.lang.String primaryKeyValue) throws java.io.IOException

Gets the file from target upload directory of a form data record

Thai

รับไฟล์จากไดเร็กทอรีอัพโหลดเป้าหมายของบันทึกข้อมูลแบบฟอร์ม

storeFile
public static void storeFile(org.springframework.web.multipart.MultipartFile file, org.joget.apps.form.model.Element form, java.lang.String primaryKeyValue)

...