• Resolved BnThink

    (@kbliang)


    Three questions:

    1. I use ajax to submit the form. I want to know whether the security verification of the image is completed when it enters the temp folder, or whether it needs to wait until the form submission stage for complete security verification?

    I would like to extract the image ahead of time to perform a custom form update, but I am concerned that the process is unsafe.

    1. When images enter the final forminator folder, thumbnails will be generated. Are there any settings or hooks to control the size and number? For example, I only need to generate the smallest thumbnail.
    2. Can the forminator media folder work fine with any image compression plugin?

    Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @kbliang,

    I hope this message finds you well.

    Can the forminator media folder work fine with any image compression plugin?

    Yes, as it’s saved in the uploads directory, any image optimization plugin should work fine.

    I have asked the Formiantor team for clarification regarding the first two queries. We’ll update you here once we have more feedback on this as soon as possible.

    Kind Regards,
    Nebu John

    Thread Starter BnThink

    (@kbliang)

    Hi. Any updates? Thanks!

    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @kbliang,

    The Forminator team has provided an update regarding your query.

    Image validation is performed before the file is uploaded to ensure security. For single file uploads, the upload is processed during form submission. For multiple file uploads, the process depends on the selected upload method.

    When images are moved to the final Forminator folder, thumbnails are generated automatically.
    Unfortunately, there are no settings or hooks available to control the size or number of thumbnails generated.

    If you have additional questions or require further clarification, feel free to let us know. We’re here to assist!

    Best Regards,
    Nebu John

    Thread Starter BnThink

    (@kbliang)

    Thanks for your reply. I’m using multiple file uploads + Ajax. And only the process of this setting combination is discussed below. Two questions:

    1. I noticed that when the image thumbnails appear ( after I dragged the files and uploaded them ), the files have been uploaded to the temp folder with a random prefix. Does this mean that the files in the temp folder have been verified? After the form is submitted, the only thing that is performed on the media is the generation of thumbnails without any additional validation. Is this correct?
    2. Does forminator use its own function to generate thumbnails or is it a built-in function of WordPress? If it is a wp function, I can adjust it myself.

    Thanks!

    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @kbliang,

    I hope this message finds you well.

    I’ve reached out to the Forminator team for clarification on the follow-up queries. We’ll provide an update here as soon as we receive their feedback.

    Best Regards,
    Nebu John

    Plugin Support Nebu John – WPMU DEV Support

    (@wpmudevsupport14)

    Hi @kbliang,

    We have an update from the Forminator team.

    The files will be validated both before they are uploaded to the temporary folder and during form submission. Once the submission is complete, thumbnails are generated.

    For generating thumbnails, we use a built-in function to ensure efficient and reliable processing.

    I hope that helps. If you have any further questions, feel free to let us know!

    Best Regards,
    Nebu John

    Thread Starter BnThink

    (@kbliang)

    Thanks for the reply. My requirement is that for some forms, I want to perform updates instead of adding new ones. So my original idea was to intercept the form data: through apply_filters(‘forminator_prepared_data’, self::$prepared_data, self::$module_object).
    Perform updates and block new additions, but this seems to have security issues.

    I’m wondering if there is a hook for after the form is submitted that can extract the validated data (including media), perform the update, and then prevent the submission.

    Thanks!

    Thread Starter BnThink

    (@kbliang)

    Or, has the $prepared_data in ‘apply_filters(‘forminator_prepared_data’, self::$prepared_data, self::$module_object)‘ already completed validation? If yes, then this problem is solved.

    Thanks!

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hi @kbliang

    I asked our development team for further information. We will get back to you once have further updates.

    Kind Regards
    Amin

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hi @kbliang

    We got further feedback from our development team.

    The hook forminator_prepared_data triggers before validation. You can try using the hook forminator_custom_form_submit_before_set_fields, which triggers after validation and file upload but before adding entry data.

    You can search for it in the plugin files to learn more about how it works.

    Best Regards,
    Amin

    Thread Starter BnThink

    (@kbliang)

    After some testing, the hook seems to work ideally, thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.