Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

File Upload functionality in Oracle-MAF.

Thiyagu PaulrajDec 10 2015 — edited Dec 16 2015

Hi,

Is there any tag or option to implement File Upload option in Oracle-MAF application.

I Have tried this, but "event.target" doesn't execute.

  <amx:panelPage id="pp1">

  <amx:verbatim id="v1">

    <![CDATA[

        <script type="text/javascript">

           function openFile(event) {

               alert("Inside OpenFile");

               var input = event.target;

               alert("input : "+input);

               var reader = new FileReader();

               reader.onload = function(){

               var dataURL = reader.result;

               var abx = dataURL;

               alert("dataURL"+dataURL);

              };   

           reader.readAsDataURL(input.files[0]);

          };

        </script>

        ]]>

    </amx:verbatim>

    <amx:facet name="header">

      <amx:outputText value="File Upload"/>

    </amx:facet>

    <amx:facet name="primary">

      <amx:commandButton id="cb1"/>

    </amx:facet>

    <amx:facet name="secondary">

      <amx:commandButton id="cb2"/>

    </amx:facet>

    <amx:commandButton text="File Upload" id="ot1" actionListener="#{uploadBean.captureFile}"/>

  </amx:panelPage>

Please share the detail/link for this functionality.

Thanks,

Thiyagu Paulraj

Comments

Processing

Post Details

Added on Dec 10 2015
2 comments
1,073 views