This is a migrated thread and some comments may be shown as answers.

Upload not works

2 Answers 69 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
alsi
Top achievements
Rank 1
alsi asked on 25 May 2009, 08:07 AM
Hi All!

today i've tried the RadUpload control with the following code and do nothing after postback:
aspx:
<form id="form1" runat="server"
    <div> 
        <asp:ScriptManager runat="server" ID="scrManager" /> 
        <telerik:RadUpload ID="RadUpload1" runat="server" AllowedFileExtensions=".jpg,.gif" 
            EnableEmbeddedSkins="False" MaxFileSize="1000000" TargetFolder="~/MyFiles"
        </telerik:RadUpload> 
        <br /> 
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" /> 
        <br /> 
    </div> 
    </form> 
public partial class Tests_FileUpload : System.Web.UI.Page 
    protected void Page_Load(object sender, EventArgs e) 
    { 
 
    } 
 
    protected void Button1_Click(object sender, EventArgs e) 
    { 
        if (RadUpload1.UploadedFiles.Count > 0) 
        { 
            foreach (UploadedFile f in RadUpload1.UploadedFiles) 
            { 
                string s = f.FileName; 
            } 
        } 
    } 

- the UploadedFiles collection empty and i've selected the proper file, size and image format (jpg image)
- no masterpage, no additional code, web.config configured for RadUpload

thx,
alsi

2 Answers, 1 is accepted

Sort by
0
Scott Allen
Top achievements
Rank 1
answered on 29 Apr 2010, 03:58 PM
I'm having the same issue. Any ideas?
0
Genady Sergeev
Telerik team
answered on 30 Apr 2010, 08:35 AM
Hello Al Ga,

Could you please check the InvalidFiles collection, does it contain fails? If both the UploadedFiles and InvalidFiles collections are empty please check the following collection:

RadUploadContext.Current.UploadedFiles

You code looks pretty fine, so the only thing that comes to my mind is that for some reason RadUpload threats the uploaded file as an invalid file.



Kind regards,
Genady Sergeev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Upload (Obsolete)
Asked by
alsi
Top achievements
Rank 1
Answers by
Scott Allen
Top achievements
Rank 1
Genady Sergeev
Telerik team
Share this question
or