From 6090023ab2f85a78eecf2abef8adb22b62f9ba13 Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Thu, 6 Mar 2025 11:20:03 +0530
Subject: [PATCH 01/17] added support for custom extensions using the edit
 dialogue

---
 ui.frontend/src/view/FormFileInputWidgetBase.js | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/ui.frontend/src/view/FormFileInputWidgetBase.js b/ui.frontend/src/view/FormFileInputWidgetBase.js
index c34eeef9c0..0af9dc65c3 100644
--- a/ui.frontend/src/view/FormFileInputWidgetBase.js
+++ b/ui.frontend/src/view/FormFileInputWidgetBase.js
@@ -446,7 +446,7 @@ class FormFileInputWidgetBase {
                 let isInvalidSize = false,
                     isInvalidFileName = false,
                     isInvalidMimeType = false;
-                //this.resetIfNotMultiSelect();
+
                 if (typeof files !== "undefined") {
                     let invalidFilesIndexes = [];
                     Array.from(files).forEach(function (file, fileIndex) {
@@ -466,9 +466,17 @@ class FormFileInputWidgetBase {
                             inValidNamefileNames = currFileName + "," + inValidNamefileNames;
                         } else {
                             let isMatch = false;
-                            let extension = currFileName.split('.').pop();
-                            let mimeType = (file.type) ? file.type : self.extensionToMimeTypeMap[extension];
-                            if (mimeType != undefined && mimeType.trim().length > 0) {
+                            let extension = currFileName.split('.').pop().toLowerCase();
+                            let mimeType = file.type || self.extensionToMimeTypeMap[extension];
+                            
+                            // If no MIME type is detected, check if the file extension is in the accept list
+                            if (!mimeType) {
+                                isMatch = this.options.accept.some(function(acceptPattern) {
+                                    // Remove leading dot if present and convert to lowercase
+                                    let cleanPattern = acceptPattern.replace(/^\./, '').toLowerCase();
+                                    return cleanPattern === extension;
+                                });
+                            } else {
                                 isMatch = this.regexMimeTypeList.some(function (rx) {
                                     return rx.test(mimeType);
                                 });

From f318496b981d674cfc8b6a977dc3724c7f5b8211 Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Mon, 10 Mar 2025 15:06:30 +0530
Subject: [PATCH 02/17] feat(FileExtensionSupport): add support for custom file
 extensions test cases

---
 .../fileinput/fileinputv2/basic/.content.xml    |  9 +++++++++
 ui.tests/test-module/libs/fixtures/sample.afe   |  0
 ui.tests/test-module/libs/fixtures/sample.ifc   |  0
 ui.tests/test-module/libs/support/commands.js   |  1 +
 .../specs/fileinput/fileinputv2.runtime.cy.js   | 17 +++++++++++++++++
 5 files changed, 27 insertions(+)
 create mode 100644 ui.tests/test-module/libs/fixtures/sample.afe
 create mode 100644 ui.tests/test-module/libs/fixtures/sample.ifc

diff --git a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv2/basic/.content.xml b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv2/basic/.content.xml
index f63e8106c1..f1747c41eb 100644
--- a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv2/basic/.content.xml
+++ b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv2/basic/.content.xml
@@ -87,6 +87,15 @@
                     textIsRich="[true,true]"
                     type="file[]"
                     visible="{Boolean}true"/>
+                <fileinput6
+                    jcr:primaryType="nt:unstructured"
+                    jcr:title="File Input - 6"
+                    sling:resourceType="core/fd/components/form/fileinput/v2/fileinput"
+                    accept="[audio/*, video/*, image/*, text/*, application/pdf,.ifc]"
+                    fieldType="file-input"
+                    readOnly="{Boolean}false"
+                    name="fileinput6"
+                    type="file"/>
             <submit
                     jcr:lastModified="{Date}2023-01-17T16:28:58.844+05:30"
                     jcr:lastModifiedBy="admin"
diff --git a/ui.tests/test-module/libs/fixtures/sample.afe b/ui.tests/test-module/libs/fixtures/sample.afe
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/ui.tests/test-module/libs/fixtures/sample.ifc b/ui.tests/test-module/libs/fixtures/sample.ifc
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/ui.tests/test-module/libs/support/commands.js b/ui.tests/test-module/libs/support/commands.js
index af89e95231..f1a6200675 100644
--- a/ui.tests/test-module/libs/support/commands.js
+++ b/ui.tests/test-module/libs/support/commands.js
@@ -769,6 +769,7 @@ const mimeTypes = {
     'bat': 'application/x-msdos-program',
     'msg': 'application/vnd.ms-outlook',
     'svg': 'image/svg+xml',
+    'ifc': 'model/ifc',
     // Add more mappings as needed
 };
 
diff --git a/ui.tests/test-module/specs/fileinput/fileinputv2.runtime.cy.js b/ui.tests/test-module/specs/fileinput/fileinputv2.runtime.cy.js
index c510ef8f28..40c1cfcc88 100644
--- a/ui.tests/test-module/specs/fileinput/fileinputv2.runtime.cy.js
+++ b/ui.tests/test-module/specs/fileinput/fileinputv2.runtime.cy.js
@@ -250,6 +250,23 @@ describe("Form with File Input V-2 - Basic Tests", () => {
         cy.get(fileInput5).should("have.attr", "disabled", "disabled"); 
     });
 
+    it(`file input should not support extenstion which are not in accept property`, () => {
+        const fileInput6 =  "input[name='fileinput6']";
+        cy.attachFile(fileInput6, ['sample.afe']);
+        cy.get('.cmp-adaptiveform-fileinput__filelist')
+            .children()
+            .should('have.length', 0);
+    });
+
+    it(`fileinput should support custom file extensions`, () => {
+        const fileInput6 =  "input[name='fileinput6']";
+        cy.attachFile(fileInput6, ['sample.ifc']);
+        cy.get('.cmp-adaptiveform-fileinput__filelist')
+            .children()
+            .should('have.length', 1)
+            .and('contain.text', 'sample.ifc');
+    });
+
 })
 
 describe("V-2 drag and drop functionality", () => {

From 1e4b082011cc39eab21680c2b62d35cbf97350b9 Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Thu, 13 Mar 2025 15:10:17 +0530
Subject: [PATCH 03/17] Updated help description to support file extensions as
 well

---
 .../form/fileinput/v1/fileinput/_cq_dialog/.content.xml          | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml
index 844f492467..dd3a943f0c 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml
@@ -144,6 +144,7 @@
                                                     jcr:primaryType="nt:unstructured"
                                                     sling:resourceType="fd/af/authoring/components/granite/form/formsmultifield"
                                                     fieldLabel="Allowed file types"
+                                                    fieldDescription="Specify the allowed file types using MIME types (for example, image/png, application/pdf) or file extensions (for example, .png, .pdf). Ensure that the specified extensions correspond to valid MIME types to avoid upload issues."
                                                     defaultValue="">
                                                 <field
                                                         name="./accept"

From f67107dc41112f088381d14965bd9d7ec1e04f9c Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Wed, 19 Mar 2025 15:16:17 +0530
Subject: [PATCH 04/17] added support for new extesnions in the file input with
 test cases

---
 .../internal/form/ReservedProperties.java     |  1 +
 .../models/v1/form/FileInputImpl.java         | 10 ++++++
 .../models/form/FileConstraint.java           |  4 +++
 .../fileinput/fileinputv2/basic/.content.xml  |  9 ------
 .../fileinput/fileinputv3/basic/.content.xml  |  9 ++++++
 .../v1/fileinput/_cq_dialog/.content.xml      |  1 -
 .../v3/fileinput/_cq_dialog/.content.xml      | 32 ++++++++++++++++++-
 .../fileinput/v3/fileinput/fileinput.html     |  2 +-
 .../src/view/FormFileInputWidgetBase.js       | 24 +++++++-------
 .../specs/fileinput/fileinput.authoring.cy.js | 19 ++++++++++-
 .../specs/fileinput/fileinputv2.runtime.cy.js | 18 -----------
 .../specs/fileinput/fileinputv3.runtime.cy.js | 17 ++++++++++
 12 files changed, 103 insertions(+), 43 deletions(-)

diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/ReservedProperties.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/ReservedProperties.java
index 34844e24b5..f9f9b5293f 100644
--- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/ReservedProperties.java
+++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/form/ReservedProperties.java
@@ -123,6 +123,7 @@ private ReservedProperties() {
     public static final String PN_UNCHECKED_VALUE = "uncheckedValue";
     public static final String PN_MAX_FILE_SIZE = "maxFileSize";
     public static final String PN_FILE_ACCEPT = "accept";
+    public static final String PN_FILE_ACCEPT_EXTENSIONS = "acceptExtensions";
     public static final String PN_BUTTON_TEXT = "buttonText";
     public static final String PN_WRAP_DATA = "wrapData";
     public static final String PN_FRAGMENT_PATH = "fragmentPath";
diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FileInputImpl.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FileInputImpl.java
index 1753357a3c..19349ba723 100644
--- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FileInputImpl.java
+++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FileInputImpl.java
@@ -57,6 +57,9 @@ public class FileInputImpl extends AbstractFieldImpl implements FileInput {
     @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_FILE_ACCEPT)
     protected String[] accept;
 
+    @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_FILE_ACCEPT_EXTENSIONS)
+    protected String[] acceptExtensions;
+
     @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_BUTTON_TEXT)
     @Default(values = FileInput.DEFAULT_BUTTON_TEXT)
     protected String buttonText;
@@ -122,6 +125,13 @@ public List<String> getAccept() {
             .orElse(Collections.emptyList());
     }
 
+    @Override
+    public List<String> getAcceptExtensions() {
+        return Optional.ofNullable(acceptExtensions)
+            .map(Arrays::asList)
+            .orElse(Collections.emptyList());
+    }
+
     @Override
     public @NotNull Map<String, Object> getProperties() {
         Map<String, Object> customProperties = super.getProperties();
diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/FileConstraint.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/FileConstraint.java
index 9b53a9632c..26f5f263be 100644
--- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/FileConstraint.java
+++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/FileConstraint.java
@@ -57,6 +57,10 @@ default List<String> getAccept() {
         return DEFAULT_ACCEPT;
     }
 
+    default List<String> getAcceptExtensions() {
+        return Collections.emptyList();
+    }
+
     /**
      * The constraint is
      * applicable for file attachment field. If the type is {@code String}, the format will always be {@code data-url}.
diff --git a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv2/basic/.content.xml b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv2/basic/.content.xml
index f1747c41eb..f63e8106c1 100644
--- a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv2/basic/.content.xml
+++ b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv2/basic/.content.xml
@@ -87,15 +87,6 @@
                     textIsRich="[true,true]"
                     type="file[]"
                     visible="{Boolean}true"/>
-                <fileinput6
-                    jcr:primaryType="nt:unstructured"
-                    jcr:title="File Input - 6"
-                    sling:resourceType="core/fd/components/form/fileinput/v2/fileinput"
-                    accept="[audio/*, video/*, image/*, text/*, application/pdf,.ifc]"
-                    fieldType="file-input"
-                    readOnly="{Boolean}false"
-                    name="fileinput6"
-                    type="file"/>
             <submit
                     jcr:lastModified="{Date}2023-01-17T16:28:58.844+05:30"
                     jcr:lastModifiedBy="admin"
diff --git a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv3/basic/.content.xml b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv3/basic/.content.xml
index 75cd5a8dc4..d850873f59 100644
--- a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv3/basic/.content.xml
+++ b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv3/basic/.content.xml
@@ -103,6 +103,15 @@
                     maxFileSize="2"
                     type="file[]"
                     visible="{Boolean}true"/>
+             <fileinput7
+                    jcr:primaryType="nt:unstructured"
+                    jcr:title="File Input - 7"
+                    sling:resourceType="core/fd/components/form/fileinput/v2/fileinput"
+                    accept="[audio/*, video/*, image/*, text/*, application/pdf,.ifc]"
+                    fieldType="file-input"
+                    readOnly="{Boolean}false"
+                    name="fileinput7"
+                    type="file"/>
             <submit
                     jcr:lastModified="{Date}2023-01-17T16:28:58.844+05:30"
                     jcr:lastModifiedBy="admin"
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml
index dd3a943f0c..844f492467 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml
@@ -144,7 +144,6 @@
                                                     jcr:primaryType="nt:unstructured"
                                                     sling:resourceType="fd/af/authoring/components/granite/form/formsmultifield"
                                                     fieldLabel="Allowed file types"
-                                                    fieldDescription="Specify the allowed file types using MIME types (for example, image/png, application/pdf) or file extensions (for example, .png, .pdf). Ensure that the specified extensions correspond to valid MIME types to avoid upload issues."
                                                     defaultValue="">
                                                 <field
                                                         name="./accept"
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml
index 0abff17e83..f77d0d3be1 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml
@@ -87,7 +87,37 @@
                     </basic>
                     <validation
                         jcr:primaryType="nt:unstructured"
-                        sling:resourceType="granite/ui/components/coral/foundation/container"/>
+                        sling:resourceType="granite/ui/components/coral/foundation/container">
+                        <items jcr:primaryType="nt:unstructured">
+                            <columns
+                                    jcr:primaryType="nt:unstructured"
+                                    sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns"
+                                    margin="{Boolean}true">
+                                <items jcr:primaryType="nt:unstructured">
+                                    <column
+                                            jcr:primaryType="nt:unstructured"
+                                            sling:resourceType="granite/ui/components/coral/foundation/container">
+                                        <items jcr:primaryType="nt:unstructured">
+                                            <extensions
+                                                    jcr:primaryType="nt:unstructured"
+                                                    sling:resourceType="fd/af/authoring/components/granite/form/formsmultifield"
+                                                    fieldLabel="Allowed file extensions"
+                                                    fieldDescription="Specify the allowed file extensions (for example, .png, .pdf). Ensure that the specified extensions correspond to valid MIME types to avoid upload issues."
+                                                    defaultValue="">
+                                                <field
+                                                        name="./acceptExtensions"
+                                                        jcr:primaryType="nt:unstructured"
+                                                        sling:resourceType="granite/ui/components/coral/foundation/form/textfield"/>
+                                            </extensions>
+                                            <acceptMessage
+                                                    jcr:primaryType="nt:unstructured"
+                                                    sling:resourceType="granite/ui/components/coral/foundation/form/textarea"/>
+                                        </items>
+                                    </column>
+                                </items>
+                            </columns>
+                        </items>
+                    </validation>
                     <help
                             jcr:primaryType="nt:unstructured"
                             jcr:title="Help Content"
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/fileinput.html b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/fileinput.html
index 2d0dce4909..6784299434 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/fileinput.html
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/fileinput.html
@@ -50,7 +50,7 @@
              name="${file.name}"
              disabled="${!file.enabled}"
              required="${file.required}"
-             accept="${file.accept}"
+             accept="${[file.accept, file.acceptExtensions] @ join=','}"
              type="file"
              data-cmp-data-layer="${file.data.json}"
         />
diff --git a/ui.frontend/src/view/FormFileInputWidgetBase.js b/ui.frontend/src/view/FormFileInputWidgetBase.js
index 0af9dc65c3..1b02513abc 100644
--- a/ui.frontend/src/view/FormFileInputWidgetBase.js
+++ b/ui.frontend/src/view/FormFileInputWidgetBase.js
@@ -454,24 +454,24 @@ class FormFileInputWidgetBase {
                             isCurrentInvalidFileName = false,
                             isCurrentInvalidMimeType = false;
                         currFileName = file.name.split("\\").pop();
-                        // Now size is in MB
-                        let size = file.size / 1024 / 1024;
-                        // check if file size limit is within limits
-                        if ((size > parseFloat(this.options.maxFileSize))) {
-                            isInvalidSize = isCurrentInvalidFileSize = true;
-                            inValidSizefileNames = currFileName + "," + inValidSizefileNames;
-                        } else if (!FileInputWidget.isValid(currFileName)) {
-                            // check if file names are valid (ie) there are no control characters in file names
-                            isInvalidFileName = isCurrentInvalidFileName = true;
-                            inValidNamefileNames = currFileName + "," + inValidNamefileNames;
-                        } else {
+                            // Now size is in MB
+                            let size = file.size / 1024 / 1024;
+                            // check if file size limit is within limits
+                            if ((size > parseFloat(this.options.maxFileSize))) {
+                                isInvalidSize = isCurrentInvalidFileSize = true;
+                                inValidSizefileNames = currFileName + "," + inValidSizefileNames;
+                            } else if (!FileInputWidget.isValid(currFileName)) {
+                                // check if file names are valid (ie) there are no control characters in file names
+                                isInvalidFileName = isCurrentInvalidFileName = true;
+                                inValidNamefileNames = currFileName + "," + inValidNamefileNames;
+                            } else {
                             let isMatch = false;
                             let extension = currFileName.split('.').pop().toLowerCase();
                             let mimeType = file.type || self.extensionToMimeTypeMap[extension];
                             
                             // If no MIME type is detected, check if the file extension is in the accept list
                             if (!mimeType) {
-                                isMatch = this.options.accept.some(function(acceptPattern) {
+                                isMatch = this.options.acceptExtensions.some(function(acceptPattern) {
                                     // Remove leading dot if present and convert to lowercase
                                     let cleanPattern = acceptPattern.replace(/^\./, '').toLowerCase();
                                     return cleanPattern === extension;
diff --git a/ui.tests/test-module/specs/fileinput/fileinput.authoring.cy.js b/ui.tests/test-module/specs/fileinput/fileinput.authoring.cy.js
index 44614f620a..370b9737ba 100644
--- a/ui.tests/test-module/specs/fileinput/fileinput.authoring.cy.js
+++ b/ui.tests/test-module/specs/fileinput/fileinput.authoring.cy.js
@@ -60,7 +60,7 @@ describe('Page - Authoring', function () {
         "File"
     );
     cy.contains("Validation").should("exist");
-
+    
     // Checking some dynamic behaviours
     cy.get("[name='./multiSelection'][type=\"checkbox\"]").should("exist").check();
     cy.get(".cmp-adaptiveform-fileinput__minimumFiles").invoke('css', 'display').should('equal','block');
@@ -70,6 +70,19 @@ describe('Page - Authoring', function () {
     cy.deleteComponentByPath(fileInputDrop);
   }
 
+  const testFileInputValidationBehaviour = function(fileInputEditPathSelector, fileInputDrop, isSites) {
+    if (isSites) {
+      dropFileInputInSites();
+    } else {
+      dropFileInputInContainer();
+    }
+    cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + fileInputEditPathSelector);
+    cy.invokeEditableAction("[data-action='CONFIGURE']");
+    cy.contains("Validation").should("exist");
+    cy.get('._coral-Tabs-itemLabel').contains('Validation').click();
+    cy.contains("Allowed file extensions").should("exist");
+  }
+
   context('Open Forms Editor', function() {
     const pagePath = "/content/forms/af/core-components-it/blank",
         fileInputEditPath = pagePath + afConstants.FORM_EDITOR_FORM_CONTAINER_SUFFIX + "/fileinput",
@@ -110,5 +123,9 @@ describe('Page - Authoring', function () {
       testFileInputBehaviour(fileInputEditPathSelector, fileInputDrop, true);
     });
 
+    it('open edit dialog of aem forms FileInput and check validation', function() {
+      testFileInputValidationBehaviour(fileInputEditPathSelector, fileInputDrop, true);
+    });
+
   });
 });
\ No newline at end of file
diff --git a/ui.tests/test-module/specs/fileinput/fileinputv2.runtime.cy.js b/ui.tests/test-module/specs/fileinput/fileinputv2.runtime.cy.js
index 40c1cfcc88..ce3dd1efb8 100644
--- a/ui.tests/test-module/specs/fileinput/fileinputv2.runtime.cy.js
+++ b/ui.tests/test-module/specs/fileinput/fileinputv2.runtime.cy.js
@@ -249,24 +249,6 @@ describe("Form with File Input V-2 - Basic Tests", () => {
         const fileInput5 =  "input[name='fileinput5']";
         cy.get(fileInput5).should("have.attr", "disabled", "disabled"); 
     });
-
-    it(`file input should not support extenstion which are not in accept property`, () => {
-        const fileInput6 =  "input[name='fileinput6']";
-        cy.attachFile(fileInput6, ['sample.afe']);
-        cy.get('.cmp-adaptiveform-fileinput__filelist')
-            .children()
-            .should('have.length', 0);
-    });
-
-    it(`fileinput should support custom file extensions`, () => {
-        const fileInput6 =  "input[name='fileinput6']";
-        cy.attachFile(fileInput6, ['sample.ifc']);
-        cy.get('.cmp-adaptiveform-fileinput__filelist')
-            .children()
-            .should('have.length', 1)
-            .and('contain.text', 'sample.ifc');
-    });
-
 })
 
 describe("V-2 drag and drop functionality", () => {
diff --git a/ui.tests/test-module/specs/fileinput/fileinputv3.runtime.cy.js b/ui.tests/test-module/specs/fileinput/fileinputv3.runtime.cy.js
index 280a03d39e..b31e00cc38 100644
--- a/ui.tests/test-module/specs/fileinput/fileinputv3.runtime.cy.js
+++ b/ui.tests/test-module/specs/fileinput/fileinputv3.runtime.cy.js
@@ -248,4 +248,21 @@ describe('Click on button tag (V-3)', () => {
             expect(alertText).to.equal(model.getState().constraintMessages.maxFileSize);
         });
      });
+
+    it(`file input should not support extenstion which are not in accept property`, () => {
+        const fileinput7 =  "input[name='fileinput7']";
+        cy.attachFile(fileInput7, ['sample.afe']);
+        cy.get('.cmp-adaptiveform-fileinput__filelist')
+            .children()
+            .should('have.length', 0);
+    });
+
+    it(`fileinput should support custom file extensions`, () => {
+        const fileInput7 =  "input[name='fileinput7']";
+        cy.attachFile(fileInput7, ['sample.ifc']);
+        cy.get('.cmp-adaptiveform-fileinput__filelist')
+            .children()
+            .should('have.length', 1)
+            .and('contain.text', 'sample.ifc');
+    });
 })
\ No newline at end of file

From 8df457ab5c72c4ce686c6eb2581110c5fe59150d Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Mon, 10 Mar 2025 15:06:30 +0530
Subject: [PATCH 05/17] feat(FileExtensionSupport): add support for custom file
 extensions test cases

---
 .../samples/fileinput/fileinputv2/basic/.content.xml     | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv2/basic/.content.xml b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv2/basic/.content.xml
index f63e8106c1..f1747c41eb 100644
--- a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv2/basic/.content.xml
+++ b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv2/basic/.content.xml
@@ -87,6 +87,15 @@
                     textIsRich="[true,true]"
                     type="file[]"
                     visible="{Boolean}true"/>
+                <fileinput6
+                    jcr:primaryType="nt:unstructured"
+                    jcr:title="File Input - 6"
+                    sling:resourceType="core/fd/components/form/fileinput/v2/fileinput"
+                    accept="[audio/*, video/*, image/*, text/*, application/pdf,.ifc]"
+                    fieldType="file-input"
+                    readOnly="{Boolean}false"
+                    name="fileinput6"
+                    type="file"/>
             <submit
                     jcr:lastModified="{Date}2023-01-17T16:28:58.844+05:30"
                     jcr:lastModifiedBy="admin"

From 3263fc7f6f8603b7e88622031b0971a8a1a93c58 Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Thu, 13 Mar 2025 15:10:17 +0530
Subject: [PATCH 06/17] Updated help description to support file extensions as
 well

---
 .../form/fileinput/v1/fileinput/_cq_dialog/.content.xml          | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml
index 844f492467..dd3a943f0c 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml
@@ -144,6 +144,7 @@
                                                     jcr:primaryType="nt:unstructured"
                                                     sling:resourceType="fd/af/authoring/components/granite/form/formsmultifield"
                                                     fieldLabel="Allowed file types"
+                                                    fieldDescription="Specify the allowed file types using MIME types (for example, image/png, application/pdf) or file extensions (for example, .png, .pdf). Ensure that the specified extensions correspond to valid MIME types to avoid upload issues."
                                                     defaultValue="">
                                                 <field
                                                         name="./accept"

From 38f946de4c15cd23f62290e9fc94f7d759f0d5e0 Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Wed, 19 Mar 2025 15:24:40 +0530
Subject: [PATCH 07/17] added support for new extesnions removed extra changes
 from other versions

---
 .../samples/fileinput/fileinputv2/basic/.content.xml     | 9 ---------
 .../form/fileinput/v1/fileinput/_cq_dialog/.content.xml  | 1 -
 2 files changed, 10 deletions(-)

diff --git a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv2/basic/.content.xml b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv2/basic/.content.xml
index f1747c41eb..f63e8106c1 100644
--- a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv2/basic/.content.xml
+++ b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv2/basic/.content.xml
@@ -87,15 +87,6 @@
                     textIsRich="[true,true]"
                     type="file[]"
                     visible="{Boolean}true"/>
-                <fileinput6
-                    jcr:primaryType="nt:unstructured"
-                    jcr:title="File Input - 6"
-                    sling:resourceType="core/fd/components/form/fileinput/v2/fileinput"
-                    accept="[audio/*, video/*, image/*, text/*, application/pdf,.ifc]"
-                    fieldType="file-input"
-                    readOnly="{Boolean}false"
-                    name="fileinput6"
-                    type="file"/>
             <submit
                     jcr:lastModified="{Date}2023-01-17T16:28:58.844+05:30"
                     jcr:lastModifiedBy="admin"
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml
index dd3a943f0c..844f492467 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v1/fileinput/_cq_dialog/.content.xml
@@ -144,7 +144,6 @@
                                                     jcr:primaryType="nt:unstructured"
                                                     sling:resourceType="fd/af/authoring/components/granite/form/formsmultifield"
                                                     fieldLabel="Allowed file types"
-                                                    fieldDescription="Specify the allowed file types using MIME types (for example, image/png, application/pdf) or file extensions (for example, .png, .pdf). Ensure that the specified extensions correspond to valid MIME types to avoid upload issues."
                                                     defaultValue="">
                                                 <field
                                                         name="./accept"

From b0dfd434a4919bed75005f7e9e9a9cba919c3864 Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Wed, 26 Mar 2025 15:47:25 +0530
Subject: [PATCH 08/17] feat(newExtensionsSupport): test cases fixed

---
 .../internal/models/v1/form/FileInputImpl.java     |  7 -------
 .../internal/models/v3/form/FileInputImplV3.java   | 14 ++++++++++++++
 .../components/models/form/FileConstraint.java     |  7 +++++++
 .../core/components/models/form/FileInput.java     | 14 ++++++++++++++
 .../fileinput/v3/fileinput/_cq_dialog/.content.xml |  4 ++++
 5 files changed, 39 insertions(+), 7 deletions(-)

diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FileInputImpl.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FileInputImpl.java
index 19349ba723..82197ac896 100644
--- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FileInputImpl.java
+++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FileInputImpl.java
@@ -125,13 +125,6 @@ public List<String> getAccept() {
             .orElse(Collections.emptyList());
     }
 
-    @Override
-    public List<String> getAcceptExtensions() {
-        return Optional.ofNullable(acceptExtensions)
-            .map(Arrays::asList)
-            .orElse(Collections.emptyList());
-    }
-
     @Override
     public @NotNull Map<String, Object> getProperties() {
         Map<String, Object> customProperties = super.getProperties();
diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v3/form/FileInputImplV3.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v3/form/FileInputImplV3.java
index 9cd3d1567f..150d73f706 100644
--- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v3/form/FileInputImplV3.java
+++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v3/form/FileInputImplV3.java
@@ -18,7 +18,11 @@
 
 package com.adobe.cq.forms.core.components.internal.models.v3.form;
 
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.resource.Resource;
@@ -48,6 +52,9 @@ public class FileInputImplV3 extends FileInputImplV2 {
     @Default(values = FileInput.DEFAULT_DRAGDROP_TEXT)
     protected String dragDropTextV3;
 
+    @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_FILE_ACCEPT_EXTENSIONS)
+    protected String[] acceptExtensions;
+
     @Override
     public String getDragDropText() {
         return dragDropTextV3;
@@ -60,4 +67,11 @@ public String getDragDropText() {
         customProperties.put(ReservedProperties.PN_DRAG_DROP_TEXT_V3, getDragDropText());
         return customProperties;
     }
+
+    @Override
+    public List<String> getAcceptExtensions() {
+        return Optional.ofNullable(acceptExtensions)
+            .map(Arrays::asList)
+            .orElse(Collections.emptyList());
+    }
 }
diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/FileConstraint.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/FileConstraint.java
index 26f5f263be..a266d076ab 100644
--- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/FileConstraint.java
+++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/FileConstraint.java
@@ -57,6 +57,13 @@ default List<String> getAccept() {
         return DEFAULT_ACCEPT;
     }
 
+    /**
+     * Returns the list of file extensions which field can accept. The constraint is
+     * applicable for file attachment field
+     *
+     * @return the list of extensions supported by the field
+     * @since com.adobe.cq.forms.core.components.models.form 0.0.1
+     */
     default List<String> getAcceptExtensions() {
         return Collections.emptyList();
     }
diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/FileInput.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/FileInput.java
index 59ead0d571..9843eccacf 100644
--- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/FileInput.java
+++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/models/form/FileInput.java
@@ -15,6 +15,9 @@
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 package com.adobe.cq.forms.core.components.models.form;
 
+import java.util.Collections;
+import java.util.List;
+
 import org.osgi.annotation.versioning.ConsumerType;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -40,6 +43,17 @@ default Boolean isMultiple() {
         return false;
     }
 
+    /**
+     * Returns the list of file extensions which field can accept. The constraint is
+     * applicable for file attachment field
+     *
+     * @return the list of extensions supported by the field
+     */
+    @JsonIgnore
+    default List<String> getAcceptExtensions() {
+        return Collections.emptyList();
+    }
+
     /**
      * Returns the text to be displayed on the file input button
      *
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml
index f77d0d3be1..5ba8593eb3 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml
@@ -108,6 +108,10 @@
                                                         name="./acceptExtensions"
                                                         jcr:primaryType="nt:unstructured"
                                                         sling:resourceType="granite/ui/components/coral/foundation/form/textfield"/>
+                                                <granite:rendercondition
+                                                    jcr:primaryType="nt:unstructured"
+                                                    sling:resourceType="granite/ui/components/renderconditions/featuretoggle"
+                                                    toggleName="FT_FORMS-18927"/>
                                             </extensions>
                                             <acceptMessage
                                                     jcr:primaryType="nt:unstructured"

From 7e2935a26e8cd35a114cffdf8f27c1bc2b7804f7 Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Tue, 1 Apr 2025 10:42:14 +0530
Subject: [PATCH 09/17] added new support for extensions

---
 .../v3/fileinput/_cq_dialog/.content.xml      | 14 +++-
 .../v3/fileinput/clientlibs/.content.xml      |  3 +
 .../fileinput/clientlibs/editor/.content.xml  |  6 ++
 .../v3/fileinput/clientlibs/editor/js.txt     | 18 +++++
 .../clientlibs/editor/js/editDialog.js        | 78 +++++++++++++++++++
 .../src/view/FormFileInputWidgetBase.js       | 11 ++-
 .../specs/fileinput/fileinput.authoring.cy.js | 28 ++++++-
 7 files changed, 152 insertions(+), 6 deletions(-)
 create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/.content.xml
 create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/editor/.content.xml
 create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/editor/js.txt
 create mode 100644 ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/editor/js/editDialog.js

diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml
index 5ba8593eb3..acd0ae91e0 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml
@@ -18,7 +18,7 @@
     jcr:primaryType="nt:unstructured"
     jcr:title="Adaptive Form File Attachment"
     sling:resourceType="cq/gui/components/authoring/dialog"
-    extraClientlibs="[core.forms.components.fileinput.v1.editor]"
+    extraClientlibs="[core.forms.components.fileinput.v3.editor]"
     helpPath="https://www.adobe.com/go/aem_af_cmp_fileinput_v2"
     trackingFeature="core-components:adaptiveform-fileinput:v2">
     <content
@@ -98,7 +98,19 @@
                                             jcr:primaryType="nt:unstructured"
                                             sling:resourceType="granite/ui/components/coral/foundation/container">
                                         <items jcr:primaryType="nt:unstructured">
+                                            <mimeType
+                                                    wrapperClass="cmp-adaptiveform-fileinput__mimeType"
+                                                    jcr:primaryType="nt:unstructured"
+                                                    sling:resourceType="fd/af/authoring/components/granite/form/formsmultifield"
+                                                    fieldLabel="Allowed file types"
+                                                    defaultValue="">
+                                                <field
+                                                        name="./accept"
+                                                        jcr:primaryType="nt:unstructured"
+                                                        sling:resourceType="granite/ui/components/coral/foundation/form/textfield"/>
+                                            </mimeType>
                                             <extensions
+                                                    wrapperClass="cmp-adaptiveform-fileinput__extensions"
                                                     jcr:primaryType="nt:unstructured"
                                                     sling:resourceType="fd/af/authoring/components/granite/form/formsmultifield"
                                                     fieldLabel="Allowed file extensions"
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/.content.xml
new file mode 100644
index 0000000000..491392d539
--- /dev/null
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/.content.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
+    jcr:primaryType="sling:Folder"/>
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/editor/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/editor/.content.xml
new file mode 100644
index 0000000000..923a9caae3
--- /dev/null
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/editor/.content.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
+    jcr:primaryType="cq:ClientLibraryFolder"
+    categories="[core.forms.components.fileinput.v3.editor]"
+    jsProcessor="[default:none,min:gcc;languageIn=ECMASCRIPT_2021;languageOut=ECMASCRIPT_2021]"
+    dependencies="[core.forms.components.base.v1.editor, core.forms.components.commons.v1.editor.utils]"/>
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/editor/js.txt b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/editor/js.txt
new file mode 100644
index 0000000000..b50ef37a85
--- /dev/null
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/editor/js.txt
@@ -0,0 +1,18 @@
+###############################################################################
+# Copyright 2025 Adobe
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###############################################################################
+
+#base=js
+editDialog.js
\ No newline at end of file
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/editor/js/editDialog.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/editor/js/editDialog.js
new file mode 100644
index 0000000000..259b27004f
--- /dev/null
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/editor/js/editDialog.js
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright 2025 Adobe
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+(function($) {
+    "use strict";
+    let EDIT_DIALOG = ".cmp-adaptiveform-fileinput__editdialog",
+        FILEINPUT_MIMETYPE = EDIT_DIALOG + " .cmp-adaptiveform-fileinput__mimeType",
+        FILEINPUT_EXTENSIONS = EDIT_DIALOG + " .cmp-adaptiveform-fileinput__extensions",
+        Utils = window.CQ.FormsCoreComponents.Utils.v1;
+
+    function handleMimeType(dialog) {
+        let mimeTypeWrapper = dialog.find(FILEINPUT_MIMETYPE);
+        let mimeTypeField = mimeTypeWrapper.find("coral-multifield");
+        let extensionsField = dialog.find(FILEINPUT_EXTENSIONS + " coral-multifield");
+        
+        function updateMimeTypeState() {
+            let hasExtensions = extensionsField.find('coral-multifield-item').length > 0;
+            
+            // Disable the entire multifield and its contents
+            mimeTypeField.css({
+                'pointer-events': hasExtensions ? 'none' : 'auto',
+                'opacity': hasExtensions ? '0.5' : '1'
+            });
+            mimeTypeField.prop('disabled', hasExtensions);
+
+            // Disable delete icons and their SVGs
+            mimeTypeField.find('coral-icon[icon="delete"], ._coral-Icon--svg').css({
+                'pointer-events': hasExtensions ? 'none' : 'auto'
+            });
+
+            // Handle MIME type items if extensions exist
+            if (hasExtensions) {
+                // Keep first item, remove others
+                let firstItem = mimeTypeField.find('coral-multifield-item').first();
+                mimeTypeField.find('coral-multifield-item:not(:first)').remove();
+                
+                // Set value of first item to */*
+                firstItem.find('input').val('*/*');
+            }
+        }
+
+        // Watch for changes in both fields
+        extensionsField.on('change', updateMimeTypeState);
+        mimeTypeField.on('change', updateMimeTypeState);
+
+        // Check initial state without triggering events
+        let hasExtensions = extensionsField.find('coral-multifield-item').length > 0;
+        if (hasExtensions) {
+            mimeTypeField.css({
+                'pointer-events': 'none',
+                'opacity': '0.5'
+            });
+            mimeTypeField.prop('disabled', true);
+            mimeTypeField.find('coral-icon[icon="delete"], ._coral-Icon--svg').css({
+                'pointer-events': 'none'
+            });
+        }
+    }
+
+    $(document).on('dialog-loaded', EDIT_DIALOG, function(e) {
+        handleMimeType($(this));
+    });
+
+    Utils.initializeEditDialog(EDIT_DIALOG)(handleMimeType);
+
+})(jQuery);
diff --git a/ui.frontend/src/view/FormFileInputWidgetBase.js b/ui.frontend/src/view/FormFileInputWidgetBase.js
index 1b02513abc..fd0d7fc98e 100644
--- a/ui.frontend/src/view/FormFileInputWidgetBase.js
+++ b/ui.frontend/src/view/FormFileInputWidgetBase.js
@@ -85,10 +85,12 @@ class FormFileInputWidgetBase {
             // initialize the regex initially
             this.regexMimeTypeList = this.options.accept.map(function (value, i) {
                 try {
+                    // Special case for */* to match all MIME types
+                    if (value.trim() === '*/*') {
+                        return /.*/;  // Match any MIME type
+                    }
                     return new RegExp(value.trim());
                 } catch (e) {
-                    // failure during regex parsing, don't return anything specific to this value since the value contains
-                    // incorrect regex string
                     if (window.console) {
                         console.log(e);
                     }
@@ -470,8 +472,11 @@ class FormFileInputWidgetBase {
                             let mimeType = file.type || self.extensionToMimeTypeMap[extension];
                             
                             // If no MIME type is detected, check if the file extension is in the accept list
-                            if (!mimeType) {
+                            if (!mimeType && this.options.acceptExtensions) {
                                 isMatch = this.options.acceptExtensions.some(function(acceptPattern) {
+                                    if(!acceptPattern) {
+                                        return false;
+                                    }
                                     // Remove leading dot if present and convert to lowercase
                                     let cleanPattern = acceptPattern.replace(/^\./, '').toLowerCase();
                                     return cleanPattern === extension;
diff --git a/ui.tests/test-module/specs/fileinput/fileinput.authoring.cy.js b/ui.tests/test-module/specs/fileinput/fileinput.authoring.cy.js
index 370b9737ba..6e6055a576 100644
--- a/ui.tests/test-module/specs/fileinput/fileinput.authoring.cy.js
+++ b/ui.tests/test-module/specs/fileinput/fileinput.authoring.cy.js
@@ -101,6 +101,28 @@ describe('Page - Authoring', function () {
     it ('open edit dialog of FileInput', function(){
       testFileInputBehaviour(fileInputEditPathSelector, fileInputDrop);
     })
+
+    it('verify mime type is disabled when extensions are present', function() {
+        // Setup component
+        dropFileInputInContainer();
+        cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + fileInputEditPathSelector);
+        cy.invokeEditableAction("[data-action='CONFIGURE']");
+        
+        // Add an extension
+        cy.get('.cmp-adaptiveform-fileinput__extensions coral-multifield-add').click();
+        cy.get('.cmp-adaptiveform-fileinput__extensions input').first().type('.pdf');
+        
+        // Verify MIME type is disabled and has single */* value
+        cy.get('.cmp-adaptiveform-fileinput__mimeType coral-multifield')
+            .should('have.css', 'pointer-events', 'none')
+            .find('coral-multifield-item')
+            .should('have.length', 1)
+            .find('input')
+            .should('have.value', '*/*');
+        
+        cy.get('.cq-dialog-cancel').click();
+        cy.deleteComponentByPath(fileInputDrop);
+    });
   })
 
   context('Open Sites Editor', function () {
@@ -123,8 +145,10 @@ describe('Page - Authoring', function () {
       testFileInputBehaviour(fileInputEditPathSelector, fileInputDrop, true);
     });
 
-    it('open edit dialog of aem forms FileInput and check validation', function() {
-      testFileInputValidationBehaviour(fileInputEditPathSelector, fileInputDrop, true);
+    it('open edit dialog of aem forms FileInput and check validation', () => {
+      if(toggle_array.includes("FT_FORMS-18927")) {
+          testFileInputValidationBehaviour(fileInputEditPathSelector, fileInputDrop, true);
+      }
     });
 
   });

From 225daa254bbf1720b779f7ad64427f23880d535c Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Fri, 25 Apr 2025 12:56:15 +0530
Subject: [PATCH 10/17] hiding info icon as per extensions support

---
 .../internal/models/v3/form/FileInputImplV3.java |  6 ++++++
 .../v3/fileinput/_cq_dialog/.content.xml         |  1 +
 .../fileinput/clientlibs/editor/js/editDialog.js | 16 ++++++++++++++++
 3 files changed, 23 insertions(+)

diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v3/form/FileInputImplV3.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v3/form/FileInputImplV3.java
index 150d73f706..d752761ea8 100644
--- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v3/form/FileInputImplV3.java
+++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v3/form/FileInputImplV3.java
@@ -70,6 +70,12 @@ public String getDragDropText() {
 
     @Override
     public List<String> getAcceptExtensions() {
+        // adding . in front of the accept extensions
+        if (acceptExtensions != null) {
+            for (int i = 0; i < acceptExtensions.length; i++) {
+                acceptExtensions[i] = "." + acceptExtensions[i];
+            }
+        }
         return Optional.ofNullable(acceptExtensions)
             .map(Arrays::asList)
             .orElse(Collections.emptyList());
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml
index acd0ae91e0..12ef681a14 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml
@@ -103,6 +103,7 @@
                                                     jcr:primaryType="nt:unstructured"
                                                     sling:resourceType="fd/af/authoring/components/granite/form/formsmultifield"
                                                     fieldLabel="Allowed file types"
+                                                    fieldDescription="This field got disabled as the allowed file extensions are specified."
                                                     defaultValue="">
                                                 <field
                                                         name="./accept"
diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/editor/js/editDialog.js b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/editor/js/editDialog.js
index 259b27004f..ab6f393620 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/editor/js/editDialog.js
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/clientlibs/editor/js/editDialog.js
@@ -24,6 +24,7 @@
         let mimeTypeWrapper = dialog.find(FILEINPUT_MIMETYPE);
         let mimeTypeField = mimeTypeWrapper.find("coral-multifield");
         let extensionsField = dialog.find(FILEINPUT_EXTENSIONS + " coral-multifield");
+        let mimeTypeFieldInfoIcon = mimeTypeWrapper.find('coral-icon.coral-Form-fieldinfo');
         
         function updateMimeTypeState() {
             let hasExtensions = extensionsField.find('coral-multifield-item').length > 0;
@@ -44,11 +45,26 @@
             if (hasExtensions) {
                 // Keep first item, remove others
                 let firstItem = mimeTypeField.find('coral-multifield-item').first();
+
+                // If no first item exists, create one
+                if (firstItem.length === 0) {
+                    // Click the add button to create a new item
+                    mimeTypeField.find('button[coral-multifield-add]').click();
+                    firstItem = mimeTypeField.find('coral-multifield-item').first();
+                }
+
                 mimeTypeField.find('coral-multifield-item:not(:first)').remove();
                 
                 // Set value of first item to */*
                 firstItem.find('input').val('*/*');
             }
+
+            if(mimeTypeFieldInfoIcon.length > 0) {
+                // show the info icon
+                mimeTypeFieldInfoIcon.css({
+                    'display': hasExtensions ? '' : 'none'
+                });
+            }
         }
 
         // Watch for changes in both fields

From 691b64192ae5101b89ea20489183adf0f6ec92ef Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Fri, 25 Apr 2025 13:21:17 +0530
Subject: [PATCH 11/17] file extensions masking removed

---
 .../core/components/internal/models/v1/form/FileInputImpl.java | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FileInputImpl.java b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FileInputImpl.java
index 82197ac896..1753357a3c 100644
--- a/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FileInputImpl.java
+++ b/bundles/af-core/src/main/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FileInputImpl.java
@@ -57,9 +57,6 @@ public class FileInputImpl extends AbstractFieldImpl implements FileInput {
     @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_FILE_ACCEPT)
     protected String[] accept;
 
-    @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_FILE_ACCEPT_EXTENSIONS)
-    protected String[] acceptExtensions;
-
     @ValueMapValue(injectionStrategy = InjectionStrategy.OPTIONAL, name = ReservedProperties.PN_BUTTON_TEXT)
     @Default(values = FileInput.DEFAULT_BUTTON_TEXT)
     protected String buttonText;

From 396b6cb6629206cf8b62b5228ffde4dbc663ff66 Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Fri, 25 Apr 2025 14:30:50 +0530
Subject: [PATCH 12/17] Test cases for model added

---
 .../internal/models/v1/form/FileConstraintTest.java   |  9 +++++++++
 .../internal/models/v3/form/FileInputImplV3Test.java  | 11 +++++++++++
 2 files changed, 20 insertions(+)

diff --git a/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FileConstraintTest.java b/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FileConstraintTest.java
index 8ff181a6b7..41f02bbc15 100644
--- a/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FileConstraintTest.java
+++ b/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v1/form/FileConstraintTest.java
@@ -15,6 +15,8 @@
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 package com.adobe.cq.forms.core.components.internal.models.v1.form;
 
+import java.util.Collections;
+
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.mockito.Mockito;
@@ -42,4 +44,11 @@ void testGetAccept() {
         Mockito.when(fileConstraintMock.getAccept()).thenCallRealMethod();
         assertThat(FileConstraint.DEFAULT_ACCEPT, is(fileConstraintMock.getAccept()));
     }
+
+    @Test
+    void testGetAcceptExtensions() {
+        FileConstraint fileConstraintMock = Mockito.mock(FileConstraint.class);
+        Mockito.when(fileConstraintMock.getAcceptExtensions()).thenCallRealMethod();
+        assertEquals(Collections.emptyList(), fileConstraintMock.getAcceptExtensions());
+    }
 }
diff --git a/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v3/form/FileInputImplV3Test.java b/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v3/form/FileInputImplV3Test.java
index 2b5711d9c8..ea684b6040 100644
--- a/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v3/form/FileInputImplV3Test.java
+++ b/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v3/form/FileInputImplV3Test.java
@@ -59,6 +59,7 @@ public class FileInputImplV3Test {
     private static final String PATH_FILEINPUT_DATALAYER = CONTENT_ROOT + "/fileinput-datalayer";
     private static final String PATH_MULTISELECT_FILEINPUT = CONTENT_ROOT + "/multiselect-fileinput";
     private static final String PATH_MULTISELECT_FILEINPUT_WITHNOTYPE = CONTENT_ROOT + "/multiselect-fileinput-withNoType";
+    private static final String PATH_FILEINPUT_WITH_MIME_TYPE = CONTENT_ROOT + "/fileinput-with-mime-type";
 
     private final AemContext context = FormsCoreComponentTestContext.newAemContext();
 
@@ -400,4 +401,14 @@ void testJSONExportDataLayer() throws Exception {
         FieldUtils.writeField(fileInput, "dataLayerEnabled", true, true);
         Utils.testJSONExport(fileInput, Utils.getTestExporterJSONPath(BASE, PATH_FILEINPUT_DATALAYER));
     }
+
+    @Test
+    void testGetAcceptExtensions() {
+        FileInput fileInput = Utils.getComponentUnderTest(PATH_FILEINPUT_CUSTOMIZED, FileInput.class, context);
+        // assert fileInput.getAcceptExtensions() to return empty list
+        assertEquals(Collections.emptyList(), fileInput.getAcceptExtensions());
+        FileInput fileInputMock = Mockito.mock(FileInput.class);
+        Mockito.when(fileInputMock.getAcceptExtensions()).thenCallRealMethod();
+        assertEquals(Collections.emptyList(), fileInput.getAcceptExtensions());
+    }
 }

From 58e07d345989b8c98163e72ce7cc57b5b2086de1 Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Fri, 25 Apr 2025 16:17:29 +0530
Subject: [PATCH 13/17] test cases fixed

---
 .../fileinput/fileinputv3/basic/.content.xml      |  2 +-
 .../specs/fileinput/fileinput.authoring.cy.js     | 15 ++++++++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv3/basic/.content.xml b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv3/basic/.content.xml
index d850873f59..12e68e2e32 100644
--- a/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv3/basic/.content.xml
+++ b/it/content/src/main/content/jcr_root/content/forms/af/core-components-it/samples/fileinput/fileinputv3/basic/.content.xml
@@ -106,7 +106,7 @@
              <fileinput7
                     jcr:primaryType="nt:unstructured"
                     jcr:title="File Input - 7"
-                    sling:resourceType="core/fd/components/form/fileinput/v2/fileinput"
+                    sling:resourceType="core/fd/components/form/fileinput/v3/fileinput"
                     accept="[audio/*, video/*, image/*, text/*, application/pdf,.ifc]"
                     fieldType="file-input"
                     readOnly="{Boolean}false"
diff --git a/ui.tests/test-module/specs/fileinput/fileinput.authoring.cy.js b/ui.tests/test-module/specs/fileinput/fileinput.authoring.cy.js
index 6e6055a576..c37ba88c43 100644
--- a/ui.tests/test-module/specs/fileinput/fileinput.authoring.cy.js
+++ b/ui.tests/test-module/specs/fileinput/fileinput.authoring.cy.js
@@ -22,6 +22,7 @@ const sitesSelectors = require('../../libs/commons/sitesSelectors'),
  * Testing FileInput with Sites Editor
  */
 describe('Page - Authoring', function () {
+  let toggle_array = [];
   // we can use these values to log in
 
   const dropFileInputInContainer = function() {
@@ -91,6 +92,11 @@ describe('Page - Authoring', function () {
     beforeEach(function () {
       // this is done since cypress session results in 403 sometimes
       cy.openAuthoring(pagePath);
+      cy.fetchFeatureToggles().then((response) => {
+        if (response.status === 200) {
+            toggle_array = response.body.enabled;
+        }
+      });
     });
 
     it('insert FileInput in form container', function () {
@@ -103,6 +109,7 @@ describe('Page - Authoring', function () {
     })
 
     it('verify mime type is disabled when extensions are present', function() {
+      if(toggle_array.includes("FT_FORMS-18927")) {
         // Setup component
         dropFileInputInContainer();
         cy.openEditableToolbar(sitesSelectors.overlays.overlay.component + fileInputEditPathSelector);
@@ -122,11 +129,12 @@ describe('Page - Authoring', function () {
         
         cy.get('.cq-dialog-cancel').click();
         cy.deleteComponentByPath(fileInputDrop);
+      }
     });
   })
 
   context('Open Sites Editor', function () {
-    const   pagePath = "/content/core-components-examples/library/adaptive-form/fileinput",
+    const pagePath = "/content/core-components-examples/library/adaptive-form/fileinput",
         fileInputEditPath = pagePath + afConstants.RESPONSIVE_GRID_DEMO_SUFFIX + "/guideContainer/fileinput",
         fileInputEditPathSelector = "[data-path='" + fileInputEditPath + "']",
         fileInputDrop = pagePath + afConstants.RESPONSIVE_GRID_DEMO_SUFFIX + '/guideContainer/' + afConstants.components.forms.resourceType.formfileinput.split("/").pop();
@@ -134,6 +142,11 @@ describe('Page - Authoring', function () {
     beforeEach(function () {
       // this is done since cypress session results in 403 sometimes
       cy.openAuthoring(pagePath);
+      cy.fetchFeatureToggles().then((response) => {
+        if (response.status === 200) {
+            toggle_array = response.body.enabled;
+        }
+    });
     });
 
     it('insert aem forms FileInput', function () {

From e525b83218e79fc35eb83b52a2b8ada89c0c1882 Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Fri, 25 Apr 2025 16:17:46 +0530
Subject: [PATCH 14/17] test cases fixed I

---
 ui.tests/test-module/specs/fileinput/fileinputv3.runtime.cy.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui.tests/test-module/specs/fileinput/fileinputv3.runtime.cy.js b/ui.tests/test-module/specs/fileinput/fileinputv3.runtime.cy.js
index b31e00cc38..d499b6ed01 100644
--- a/ui.tests/test-module/specs/fileinput/fileinputv3.runtime.cy.js
+++ b/ui.tests/test-module/specs/fileinput/fileinputv3.runtime.cy.js
@@ -250,7 +250,7 @@ describe('Click on button tag (V-3)', () => {
      });
 
     it(`file input should not support extenstion which are not in accept property`, () => {
-        const fileinput7 =  "input[name='fileinput7']";
+        const fileInput7 =  "input[name='fileinput7']";
         cy.attachFile(fileInput7, ['sample.afe']);
         cy.get('.cmp-adaptiveform-fileinput__filelist')
             .children()

From 49cd2ed870c67ad29eb879164a32f1b0127737a8 Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Fri, 25 Apr 2025 17:05:12 +0530
Subject: [PATCH 15/17] test cases fixed for extensions support in file input

---
 .../models/v3/form/FileInputImplV3Test.java         | 13 ++++++++++---
 .../fileinputv3/exporter-fileinput-customized.json  |  4 ++++
 .../resources/form/fileinputv3/test-content.json    |  6 +++++-
 3 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v3/form/FileInputImplV3Test.java b/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v3/form/FileInputImplV3Test.java
index ea684b6040..7fdd7a8291 100644
--- a/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v3/form/FileInputImplV3Test.java
+++ b/bundles/af-core/src/test/java/com/adobe/cq/forms/core/components/internal/models/v3/form/FileInputImplV3Test.java
@@ -17,6 +17,7 @@
 
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.lang3.reflect.FieldUtils;
@@ -41,7 +42,7 @@
 import io.wcm.testing.mock.aem.junit5.AemContext;
 import io.wcm.testing.mock.aem.junit5.AemContextExtension;
 
-import static org.hamcrest.CoreMatchers.*;
+import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertThat;
@@ -59,7 +60,6 @@ public class FileInputImplV3Test {
     private static final String PATH_FILEINPUT_DATALAYER = CONTENT_ROOT + "/fileinput-datalayer";
     private static final String PATH_MULTISELECT_FILEINPUT = CONTENT_ROOT + "/multiselect-fileinput";
     private static final String PATH_MULTISELECT_FILEINPUT_WITHNOTYPE = CONTENT_ROOT + "/multiselect-fileinput-withNoType";
-    private static final String PATH_FILEINPUT_WITH_MIME_TYPE = CONTENT_ROOT + "/fileinput-with-mime-type";
 
     private final AemContext context = FormsCoreComponentTestContext.newAemContext();
 
@@ -404,11 +404,18 @@ void testJSONExportDataLayer() throws Exception {
 
     @Test
     void testGetAcceptExtensions() {
-        FileInput fileInput = Utils.getComponentUnderTest(PATH_FILEINPUT_CUSTOMIZED, FileInput.class, context);
+        FileInput fileInput = Utils.getComponentUnderTest(PATH_FILEINPUT_DATALAYER, FileInput.class, context);
         // assert fileInput.getAcceptExtensions() to return empty list
         assertEquals(Collections.emptyList(), fileInput.getAcceptExtensions());
         FileInput fileInputMock = Mockito.mock(FileInput.class);
         Mockito.when(fileInputMock.getAcceptExtensions()).thenCallRealMethod();
         assertEquals(Collections.emptyList(), fileInput.getAcceptExtensions());
     }
+
+    @Test
+    void testGetAcceptExtensionsWithExtensions() {
+        FileInput fileInput = Utils.getComponentUnderTest(PATH_FILEINPUT_CUSTOMIZED, FileInput.class, context);
+        List<String> extensions = fileInput.getAcceptExtensions();
+        assertThat(Arrays.asList(".jpg", ".png"), is(extensions));
+    }
 }
diff --git a/bundles/af-core/src/test/resources/form/fileinputv3/exporter-fileinput-customized.json b/bundles/af-core/src/test/resources/form/fileinputv3/exporter-fileinput-customized.json
index b68d1c719e..eb9147cc64 100644
--- a/bundles/af-core/src/test/resources/form/fileinputv3/exporter-fileinput-customized.json
+++ b/bundles/af-core/src/test/resources/form/fileinputv3/exporter-fileinput-customized.json
@@ -21,6 +21,10 @@
     "video/*",
     "image/*"
   ],
+  "acceptExtensions": [
+    "jpg",
+    "png"
+  ],
   "dataRef":"a.b",
   "events": {
     "custom:setProperty": [
diff --git a/bundles/af-core/src/test/resources/form/fileinputv3/test-content.json b/bundles/af-core/src/test/resources/form/fileinputv3/test-content.json
index cf986cda6e..829afd8276 100644
--- a/bundles/af-core/src/test/resources/form/fileinputv3/test-content.json
+++ b/bundles/af-core/src/test/resources/form/fileinputv3/test-content.json
@@ -31,7 +31,11 @@
     "custom" : "Custom screen reader text",
     "tooltip": "test-short-description",
     "maxFileSize" : "4",
-    "accept" : ["audio/*", "video/*", "image/*"]
+    "accept" : ["audio/*", "video/*", "image/*"],
+    "acceptExtensions": [
+      "jpg",
+      "png"
+    ]
   },
   "multiselect-fileinput" : {
     "jcr:primaryType": "nt:unstructured",

From cd411cd1687a7d1dbce982c46017ef1a29423e77 Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Fri, 25 Apr 2025 17:23:40 +0530
Subject: [PATCH 16/17] test cases fixed for extensions support in file input

---
 .../form/fileinputv3/exporter-fileinput-customized.json       | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/bundles/af-core/src/test/resources/form/fileinputv3/exporter-fileinput-customized.json b/bundles/af-core/src/test/resources/form/fileinputv3/exporter-fileinput-customized.json
index eb9147cc64..b68d1c719e 100644
--- a/bundles/af-core/src/test/resources/form/fileinputv3/exporter-fileinput-customized.json
+++ b/bundles/af-core/src/test/resources/form/fileinputv3/exporter-fileinput-customized.json
@@ -21,10 +21,6 @@
     "video/*",
     "image/*"
   ],
-  "acceptExtensions": [
-    "jpg",
-    "png"
-  ],
   "dataRef":"a.b",
   "events": {
     "custom:setProperty": [

From c10b1e93699ceec535b1b080d77f17e7e5e91f57 Mon Sep 17 00:00:00 2001
From: Rajat Khurana <rajatkhurana@adobe.com>
Date: Wed, 7 May 2025 10:11:20 +0530
Subject: [PATCH 17/17] File Type and file extensions descriptions added

---
 .../form/fileinput/v3/fileinput/_cq_dialog/.content.xml       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml
index 12ef681a14..7b5c827357 100644
--- a/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml
+++ b/ui.af.apps/src/main/content/jcr_root/apps/core/fd/components/form/fileinput/v3/fileinput/_cq_dialog/.content.xml
@@ -103,7 +103,7 @@
                                                     jcr:primaryType="nt:unstructured"
                                                     sling:resourceType="fd/af/authoring/components/granite/form/formsmultifield"
                                                     fieldLabel="Allowed file types"
-                                                    fieldDescription="This field got disabled as the allowed file extensions are specified."
+                                                    fieldDescription="Specify allowed MIME types (for example, image/jpeg) to filter uploads. You can use this option or 'Allowed file extensions'. However, this setting is disabled if any 'Allowed file extensions' are specified."
                                                     defaultValue="">
                                                 <field
                                                         name="./accept"
@@ -115,7 +115,7 @@
                                                     jcr:primaryType="nt:unstructured"
                                                     sling:resourceType="fd/af/authoring/components/granite/form/formsmultifield"
                                                     fieldLabel="Allowed file extensions"
-                                                    fieldDescription="Specify the allowed file extensions (for example, .png, .pdf). Ensure that the specified extensions correspond to valid MIME types to avoid upload issues."
+                                                    fieldDescription="Specify allowed file extensions (for example, jpg, pdf) to filter uploads. Using this option will disable and override the 'Allowed file types' setting."
                                                     defaultValue="">
                                                 <field
                                                         name="./acceptExtensions"