Using the MoveTo method wont show files after upload

Last post 01-12-2012, 1:06 PM by Kenneth. 5 replies.
Sort Posts: Previous Next
  •  01-10-2012, 11:53 AM 72593

    Using the MoveTo method wont show files after upload

    If I use CopyTo the files are shown, but if I use MoveTo,  the files are not shown. I am using the multiple file upload. How can I still show the files uploaded, but also move them? We dont want to have to manage deleting items from a folder of temp files.
  •  01-11-2012, 5:31 AM 72621 in reply to 72593

    Re: Using the MoveTo method wont show files after upload

    Hi websitepro,
     
    1. but if I use MoveTo,  the files are not shown.
     
    What do you mean not shown? the uploaded file did not shows in the store folder? Or did not shows in the uploader attachment list?
     
    And the temp files will be deleted after 8 hours.
     
    Regards,
     
    Ken 
  •  01-11-2012, 11:40 AM 72633 in reply to 72621

    Re: Using the MoveTo method wont show files after upload

    Not shown, as in the table that shows below after uploading in the list:
    ex.
    image.jpg     DELETE
     
     
    Thanks for telling me about the deleted after 8 hours. I did not know that.
  •  01-12-2012, 6:22 AM 72646 in reply to 72633

    Re: Using the MoveTo method wont show files after upload

    Hi websitepro,
     
    The MoveTo will remove the temp files, then the attachment item will be removed too. If you need to keep the attachment list, please use CopyTo method.
     
    Regards,
     
    Ken 
  •  01-12-2012, 11:00 AM 72651 in reply to 72646

    Re: Using the MoveTo method wont show files after upload

    I understand what you are saying, however it doesnt help if the user were to delete the file. I was capable of getting the result I need with your uploader with a bit of coding, but I thought maybe there would be an option to reroute the directory linking if moved etc. Someway of tracking what is being done for simplicity. May be an option you guys can look into for future versions.
     
    For now, I have created another panel that displays the uploaded files seperate from your uploader with the required options I needed.
     
     
  •  01-12-2012, 1:06 PM 72658 in reply to 72651

    Re: Using the MoveTo method wont show files after upload

    Hi websitepro,
     
    If you do not want the user to delete the upload file, you can create your own attachment table, like the example below. I have removed the "remove" link for each file. 
     
    <%@ 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">
       
       
        protected void Attachments1_PreRender(object sender, EventArgs e)
        {
            Attachments1.GetItemsTable().Visible = false;
            DataList1.DataSource = Attachments1.Items;
            DataList1.DataBind();
        }
     
    </script>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <div>
                <CuteWebUI:UploadAttachments InsertText="Upload Multiple files Now" runat="server"
                    OnPreRender="Attachments1_PreRender" ID="Attachments1">
                </CuteWebUI:UploadAttachments>
                <asp:DataList ID="DataList1" runat="server">
                    <ItemTemplate>
                        <table cellpadding="0" cellspacing="0" border="0" style="border-top: solid 1px #ededed;
                            border-bottom: solid 1px #ededed;">
                            <tr>
                                <td style="border-left: solid 1px #ededed; width: 40px">
                                    <img src="CuteWebUI_Uploader_Resource.axd?type=file&file=circle.png&_ver=634009764514705972" /></td>
                                <td style="border-left: solid 1px #ededed;border-right: solid 1px #ededed; width: 300px">
                                    <%# Eval("FileName") %>
                                    (
                                    <%# Eval("FileSize") %>
                                    Byte )
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:DataList>
            </div>
        </form>
    </body>
    </html>
     
    Regards,
     
    Ken 
View as RSS news feed in XML