Not able to upload some PDF files

Last post 11-13-2008, 1:46 PM by cutechat. 11 replies.
Sort Posts: Previous Next
  •  11-05-2008, 5:19 AM 45407

    Not able to upload some PDF files

    Hello,
     
    I got this error message when I try to upload some PDF files :
     
     
     
    Anyone could help?
     
    Thanks in advance,
  •  11-05-2008, 8:32 AM 45415 in reply to 45407

    Re: Not able to upload some PDF files

    Hi,
     
    Is there the same error if you upload only 1 file ?
     
    Regards,
    Terry
     
  •  11-05-2008, 8:43 AM 45416 in reply to 45415

    Re: Not able to upload some PDF files

    Hello Terry,
     
    Yes the same thing happens
     
    Edit : I just tried with a ppt file and it's not working either.Files are well uploaded to the temp directory,but it's not possible to open them (I get the basic error message :  file corrupted)
  •  11-05-2008, 9:01 AM 45417 in reply to 45416

    Re: Not able to upload some PDF files

    Hi,
     
    We just found the reason and have fixed it.
     
    We will provide a new package for download soon.
     
    Regards,
    Terry
  •  11-05-2008, 9:08 AM 45418 in reply to 45417

    Re: Not able to upload some PDF files

    Hi,
     
    Please download the control again.
     
    Regards,
    Terry
  •  11-05-2008, 9:38 AM 45421 in reply to 45418

    Re: Not able to upload some PDF files

    Everything's OK , Thanks a lot !

  •  11-06-2008, 10:59 AM 45467 in reply to 45418

    Re: Not able to upload some PDF files

    Hi,
     
    I had the same problem (with EPS  files). I've downloaded the control again and this seems effectively to solve the problem.
    However, I encounter a new one since this correction. I use an <asp:image> instead of a text button to launch de Uploader (like in simple-upload-ui.aspx). With the new dll, before the first clik, all is OK. I can see the image and clickink on it works. After this first clik, so after the partial postback since my widget is in an updatepanel, the image stays visible but a new button appear. There's no more link on the image, only the button is able to launch the next uploads. With the old DLL the same code was working (except for the final error of course...)
     
    Regards
    André
  •  11-06-2008, 2:37 PM 45480 in reply to 45418

    Re: Not able to upload some PDF files

    Re-Hi,
     
    After some experiments, here are some precisions :
     
    Testing the new version of your dll on "AjaxUploader samples" it seems to work normaly.
     
    What about me ? In my code, the Uploader control is declared in a view control which has visible attribute set to false. It becomes true after a menu item selection.
     
    1) If I set  the initial visible state to true, Uploader works again.
    2) Wile keeping Visible=false, if I use a PostBackTrigger in Trigger element (doing so a complete postback), Uploader works again.
     
    Regards
    André
  •  11-06-2008, 8:14 PM 45487 in reply to 45480

    Re: Not able to upload some PDF files

    André,
     
    When the uploader try to create it own button, that means the uploader are not able to find the <asp:image> in client side.
     
    I am not sure what happens. Can you post a sample code which cause that issue ?
     
    Regards,
    Terry
  •  11-07-2008, 4:18 AM 45502 in reply to 45487

    Re: Not able to upload some PDF files

    Here is an exemple of the problem. It's derived from simple-upload-UI.aspx.
     
    Modification of simple-upload-UI.aspx :
    The forms begins now with a simple button.
    All the old part of the form is placed into a MultiView/View.
    Initialy, the multiview have its visible attribute set to false.
    The callback of the first button sets the visible attribute of the multiview to true.
     
    Prolem with the new code :
    After the first clic on the button. the old form appear. OK 
    The first use of image upload is normal.  OK
    Now, the association of "InsertButtonID='Uploader1Insert'" is lost. NON OK
    The original text button of  Uploader1 appear. NON OK
     
    Code :
     
     <%@ Page Language="C#" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <script runat="server">

    void InsertMsg(string msg)

    {

    ListBoxEvents.Items.Insert(0, msg);

    ListBoxEvents.SelectedIndex = 0;

    }

    protected override void OnInit(EventArgs e)

    {

    base.OnInit(e);

    SampleUtil.SetPageCache();

    Uploader1.FileUploaded += new UploaderEventHandler(Uploader_FileUploaded);

    ButtonPostBack.Click += new EventHandler(ButtonPostBack_Click);

    }

    void ButtonPostBack_Click(object sender, EventArgs e)

    {

    InsertMsg("You clicked a PostBack Button.");

    }

    void Uploader_FileUploaded(object sender, UploaderEventArgs args)

    {

    Uploader uploader = (Uploader)sender;

    InsertMsg("File uploaded! " + args.FileName + ", " + args.FileSize + " bytes.");

    //Copys the uploaded file to a new location.

    //args.CopyTo(path);

    //You can also open the uploaded file's data stream.

    //System.IO.Stream data = args.OpenStream();

    }

    protected void Page_Load(object sender, EventArgs e)

    {

    }

    void MakeVisible_Click(object sender, EventArgs args)

    {

    MultiView1.Visible = true;

    }

    </script>

    <html xmlns="http://www.w3.org/1999/xhtml" >

    <head runat="server">

    <title>Simple Upload Into MultiView/View</title>

    <link rel="stylesheet" href="demo.css" type="text/css" />

    </head>

    <body>

    <form id="form1" runat="server">

    <asp:ScriptManager ID="Scriptmanager1" runat="server">

    </asp:ScriptManager>

    <p><asp:Button ID="MakeVisible" runat="server" Text="Make Visible" OnClick="MakeVisible_Click"/></p>

    <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0" Visible="false">

    <asp:View ID="View1" runat="server">

    <div class="content">

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">

    <ContentTemplate>

    <h2>Simple Upload (Customizing the UI) </h2>

    <p>A sample demonstrating how to customize the look and feel of file upload controls. (Maximum file size: 10M).

    </p>

     

     

    <asp:Image runat="server" ID="Uploader1Insert" AlternateText="Upload File"

    ImageUrl="~/sampleimages/upload.png" />

     

    <asp:Panel runat="server" ID="Uploader1Progress" BorderColor="Orange" BorderStyle="dashed"

    BorderWidth="2" Style="PADDING-RIGHT: 4px;PADDING-LEFT: 4px;PADDING-BOTTOM: 4px;PADDING-TOP: 4px">

    <asp:Label id="Uploader1ProgressText" runat="server" ForeColor="Firebrick"></asp:Label>

    </asp:Panel>

     

    <asp:Image runat="server" ID="Uploader1Cancel" AlternateText="Cancel" ImageUrl="~/sampleimages/cancel_button.gif" />

     

    <CuteWebUI:Uploader runat="server" ID="Uploader1"

    InsertButtonID='Uploader1Insert'

    ProgressCtrlID='Uploader1Progress'

    ProgressTextID='Uploader1ProgressText'

    CancelButtonID='Uploader1Cancel'>

    <VALIDATEOPTION MaxSizeKB="10240" />

    </CuteWebUI:Uploader>

     <br /><br />

    <div>

    Server Trace:

    <br><br>

    <asp:ListBox runat="server" ID="ListBoxEvents" Width="400"></asp:ListBox>

    </div>

    <br><br>

    <asp:Button ID="ButtonPostBack" Text="This is a PostBack button" runat="server"/>

    </ContentTemplate>

    </asp:UpdatePanel>

    </div>

    </asp:View></asp:MultiView>

     

    </form>

    </body>

    </html>
     
     
    Thank's a lot
     
    André
     
  •  11-09-2008, 8:11 PM 45546 in reply to 45502

    Re: Not able to upload some PDF files

    André,
     
    We are still investigating this issue and will give you a feedback as soon as possible
     
    Regards,
    Terry.
  •  11-13-2008, 1:46 PM 45705 in reply to 45502

    Re: Not able to upload some PDF files

    André,
     
    We have improved the code for this issue.
     
    Please try again.
     
    Regards,
    Terry
View as RSS news feed in XML