Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Finding Upload file size - Javascript

    Hi All,

    Hope I can some clear idea for this post here.

    I have used ASP.net 1.1. In that application user can upload the file(any printable document like doc/xls/ppt/pps/jpg/gif etc.,). The user allows to upload a max of 4MB.

    But if the user uploads more than 4MB I'll issue a msg. But in slow network, the user needs to wait for much time to upload and even get error msg.

    I want to stop from client side itself. Once the user selects the file to upload it shud b checked frm Javascript.

    * Is there any way to do achieve this?
    * The user should not change security settings in browser, if u suggests some method.
    * If it is not possible/meaningful then please tell me the reasons very clearly. So I can stop searching.
    * Please note any printable document can be uploaded.


    Moderators & Experts please give kind attention.

    Thanks
    Usha

  • #2
    Senior Coder
    Join Date
    Apr 2005
    Posts
    1,051
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i've looked into this one once before and the only way is with an activeX component which requires signing.

    you could always take the way of XmlHttpRequests and just 'uploading... uploading... upload failed: file too big!' (similar to gmail)
    public string ConjunctionJunction(string words, string phrases, string clauses)
    {
    return (String)(words + phrases + clauses);
    }
    <--- Was I Helpfull? Let me know ---<

  • #3
    Senior Coder
    Join Date
    Apr 2005
    Posts
    1,051
    Thanks
    0
    Thanked 0 Times in 0 Posts
    *requires security changes in FF
    http://www.captain.at/ajax-file-upload.php

    http://php5.bluga.net/progressDemo/demo.php *Good one with the 'codebehind' done in php, you can easily convert.
    public string ConjunctionJunction(string words, string phrases, string clauses)
    {
    return (String)(words + phrases + clauses);
    }
    <--- Was I Helpfull? Let me know ---<


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •