Results 1 to 2 of 2

Thread: How to get the size of the file using QHTTP?

  1. #1
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    10
    Thanked 13 Times in 12 Posts

    Default How to get the size of the file using QHTTP?

    How to get the size of the file using QHTTP? I am using QHTTP to download a file, but now i dont want to save the file in hard disk, instead i want to read it and store it in a buffer, so initially i want to know the size of the file, how to find the size of the file with the URL provided??

  2. #2
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    10
    Thanked 13 Times in 12 Posts

    Default Re: How to get the size of the file using QHTTP?

    I have found the solution,

    Qt Code:
    1. QHttp http;
    2. int size=http.readAll().size();
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Qhttp Get file size in Link download
    By nhs_0702 in forum Qt Programming
    Replies: 2
    Last Post: 17th April 2010, 10:24
  2. Qhttp Upload file
    By danny.lesnik in forum Qt Programming
    Replies: 5
    Last Post: 11th December 2009, 10:02
  3. Qhttp get in qt3 to file? file is empty until app is close?
    By triperzonak in forum Qt Programming
    Replies: 1
    Last Post: 20th September 2008, 16:54
  4. Replies: 13
    Last Post: 21st June 2006, 22:22
  5. QHttp GET File & Password
    By patrik08 in forum Qt Programming
    Replies: 4
    Last Post: 11th June 2006, 14:04

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.