how do I edit

Last post 02-22-2013, 12:29 PM by Kenneth. 3 replies.
Sort Posts: Previous Next
  •  02-21-2013, 8:27 AM 76896

    how do I edit

    Hello Friends
    How do I edit my friends aspuploader script by myself.
    How can turn error messages were also evaluated for my language
    I want to register in order to Sql connection.
    Can you help me in this regard.
    Thank you in advance
  •  02-21-2013, 12:32 PM 76897 in reply to 76896

    Re: how do I edit

    Hi sewox,

     

    Which error message you mean? can you show me the full message?

     

    And what do you mean register in order to sql connection? can you explain your requirement in detail?

     

    If you mean save the upload file info into database after uploaded. you can achieve it by the code below

     

    <%@ Language="VBScript" %>
    <!-- #include file="aspuploader/include_aspuploader.asp" -->
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
          <title>
                example
          </title>
    </head>
    <body>
          <div>                        
                       <form id="form1" method="POST">
                      <%
                      Dim uploader
                      Set uploader=new AspUploader
                      uploader.MaxSizeKB=10240
                      uploader.Name="myuploader"
                      uploader.InsertText="Upload File (Max 10M)"
                      uploader.MultipleFilesUpload=true
                      %>
                      <%=uploader.GetString() %>
                      </form>
                      
                      <br/><br/>
    <%
    If Request.Form("myuploader")&""<>"" Then


          Dim list,i
          
          'Gets the GUID List of the files based on uploader name 
          list=Split(Request.Form("myuploader"),"/")


          For i=0 to Ubound(list)
                Dim mvcfile
                'get the uploaded file based on GUID

                'save upload file info into db here
                Set mvcfile=uploader.GetUploadedFile(list(i))
                'mvcfile.FileName is the upload file name

                'mvcfile.FileSize is the upload file size

                 'also you can handle the upload file store location and new file name here

                 mvcfile.CopyTo(Server.MapPath(".")&"/savefiles/"&mvcfile.FileName)
          Next
    End If


    %>
                      
          </div>
    </body>
    </html>


     

    Regards,

     

    Ken 

  •  02-21-2013, 1:04 PM 76899 in reply to 76897

    Re: how do I edit

    No error message, the names of any files that are loaded veritabanıma I just want to register,
    Turkish error messages also how can I do?


    note!: I'm sorry my english is not good
  •  02-22-2013, 12:29 PM 76909 in reply to 76899

    Re: how do I edit

    Hi sewox,

     

    You can catch the upload error by the API below, and shows your own error message.

     

    <script type="text/javascript">
        function CuteWebUI_AjaxUploader_OnError(msg)
        {
             alert("global error:"+msg);
             return false;
        }
        function CuteWebUI_AjaxUploader_OnTaskError(obj,msg,reason) 
        {
            alert("file error:"+obj.FileName+" , "+msg);
            return false;
        }
    </script>
     

    Regards,

     

    Ken 

View as RSS news feed in XML