This Amazon S3 File Upload field is a sample plugin to showcase on how you can develop a plugin to integrate with third party service like Amazon S3 storage.
This Amazon S3 File Upload field is a combination of Form Field Element Plugin, Form Store Binder Plugin and Web Service Plugin implementations which contains 2 classes "AwsS3FileUpload" and "AwsS3FileBinder".
ฟิลด์อัปโหลดไฟล์ Amazon S3 นี้เป็นปลั๊กอินตัวอย่างเพื่อแสดงวิธีที่คุณสามารถพัฒนาปลั๊กอินเพื่อรวมเข้ากับบริการของบุคคลที่สามเช่นที่เก็บข้อมูล Amazon S3 ฟิลด์อัปโหลดไฟล์ Amazon S3 นี้เป็นการรวมกันของ Form Field Element Plugin, Form Store Binder Pluginและ Web Service Plugin ซึ่งมี 2 คลาส "AwsS3FileUpload" และ "AwsS3FileBinder"
AwsS3FileUpload class
AwsS3FileUpload คลาส
คลาสนี้ขยายคลาส FileUpload ในผลิตภัณฑ์ Joget Workflow เพื่อให้เราสามารถใช้เทมเพลตคุณสมบัติและวิธีการบางอย่างในคลาส FileUpload อีกครั้ง นอกจากนี้ยังใช้ Web Service Plugin เพื่อให้ลิงก์สำหรับดาวน์โหลดไฟล์ องค์ประกอบนี้ตั้งค่าตัวยึดอุปกรณ์จัดเก็บเป็น "AwsS3FileBinder" เพื่อจัดการไฟล์ที่จัดเก็บเป็น Amazon S3
AwsS3FileBinder class
คลาส AwsS3FileBinder
คลาสนี้ใช้ปลั๊กอิน Form Store Binder Plugin เพื่ออัปโหลดไฟล์ไปยัง AWS S3 ในเหตุการณ์การจัดเก็บแบบฟอร์ม
Resources
ทรัพยากร
Plugin: aws_s3_upload_field-5.0.0.jar
Amazon S3 Configuration File: awsS3.properties (put this properties file in your wflow folder)
รหัสที่มา: amazon_s3_upload_field_src.zip
ปลั๊กอิน: aws_s3_upload_field-5.0.0.jar
ไฟล์การกำหนดค่า Amazon S3: awsS3.properties (วางไฟล์คุณสมบัตินี้ในโฟลเดอร์ wflow ของคุณ)
For Java 11:
Source Code: amazon_s3_upload_field_src_java11.zip
Plugin: aws_s3_upload_field-7.0.0.jar
สำหรับ Java 11:
รหัสที่มา: amazon_s3_upload_field_src_java11.zip
ปลั๊กอิน: aws_s3_upload_field-7.0.0.jar
Screenshots
ภาพหน้าจอ
In form builder, when the AWS S3 configuration file is missing.
ในตัวสร้างฟอร์มเมื่อไฟล์การกำหนดค่า AWS S3 หายไป
In form builder, when there are error connecting to AWS S3 server.
ในตัวสร้างฟอร์มเมื่อมีข้อผิดพลาดในการเชื่อมต่อกับเซิร์ฟเวอร์ AWS S3