EasyUI Forum
May 16, 2024, 03:43:15 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: file upload  (Read 18625 times)
j_haus22
Newbie
*
Posts: 3


View Profile Email
« on: December 03, 2013, 06:58:52 PM »

hi, newb to jeasyui and the forums.

i have a form that opens from a selected row in a datagrid. the form has a <input type='file'> that i want to use to allow an attachment to an email. when the form is submitted, the $_REQUEST object shows the path but the $_FILES object has nothing in it... what gives?

j
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 03, 2013, 07:48:33 PM »

To upload a file, the 'enctype' attribute must be specified as "multipart/form-data".
Code:
<form id="fm" action="..." method="post" enctype="multipart/form-data">
</form>
Logged
hjzhbb7758
Jr. Member
**
Posts: 84


View Profile Email
« Reply #2 on: December 04, 2013, 12:17:04 AM »

To upload a file, the 'enctype' attribute must be specified as "multipart/form-data".
Code:
<form id="fm" action="..." method="post" enctype="multipart/form-data">
</form>

why easyui not have upload  plug
Logged
j_haus22
Newbie
*
Posts: 3


View Profile Email
« Reply #3 on: December 04, 2013, 07:33:45 AM »

y, i have the enctype set as multipart/form-data:

           <div id="dlg_reply_task" class="easyui-dialog" style="width:850px;height:500px;padding:10px 20px" closed="true" buttons="#e_reply_dlg-buttons">
              <div class="ftitle">Message Info</div>
              <form id="fm_reply_task" methoda="post" enctype="multipart/form-data">
                <input hidden="true" class="easyui-validatebox" type="text" name="rt_task_id" id="rt_task_id" />
                <input hidden="true" class="easyui-validatebox" type="text" name="rt_client_id" id="rt_client_id" />
                <input hidden="true" class="easyui-validatebox" type="text" name="rt_letter_id" id="rt_letter_id" />
                <input hidden="true" class="easyui-validatebox" type="text" name="rt_email_recipient" id="rt_email_recipient" />
                <textarea id="rt_email_text" name="rt_email_text" cols="105" rows="20"></textarea>
                <div style="padding:5px;background:#fafafa;width:100%;text-align:left;">
                    Letter: <input class="easyui-combobox" style="width:160px;" id="et_letter_text" name="et_letter_text" data-options="valueField:'letter_id',textField:'letter_name'"></input>
                    <input type="checkbox" id="rt_autosig" name="rt_autosig" checked="checked">Add Auto Signature</input><p>
                </div>
                <label for="rt_file_label">Filename:</label>
                <input type="file" name="rt_file" id="rt_file"><br />
                <div style="padding:5px;background:#fafafa;width:100%;text-align:right;">
                    <a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="sendReply();">Send</a>
                    <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg_reply_task').dialog('close')">Cancel</a>
                </div>
              </form>
           </div>
Logged
j_haus22
Newbie
*
Posts: 3


View Profile Email
« Reply #4 on: December 04, 2013, 07:43:35 AM »

sorry, i noticed a typo in the code i posted (methoda="post") so i corrected that and it seems to be working now.

thx!!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!