EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 16, 2024, 03:43:15 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
file upload
Pages: [
1
]
« previous
next »
Print
Author
Topic: file upload (Read 18625 times)
j_haus22
Newbie
Posts: 3
file upload
«
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
Re: file upload
«
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
Re: file upload
«
Reply #2 on:
December 04, 2013, 12:17:04 AM »
Quote from: stworthy 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>
why easyui not have upload plug
Logged
j_haus22
Newbie
Posts: 3
Re: file upload
«
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
Re: file upload
«
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
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...