Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Getting the file size of an email attachment

  1. #1
    Junior Member
    Join Date
    Apr 2014
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Getting the file size of an email attachment

    Hello,

    Good Day,

    I would like to ask for your help on how to get the file size of an email attachment.

    I used the following code to get this information.

    l_EndUserObj.attachmentSize = mailAttachments.length();

    The output is constant 2 even though the file size for each email attachment differ.

    When I tried to use the getsize() I'm just getting an error that it is not a function.

    I'm using BPM Studio during my coding.

    Many Thanks,

    Regards,
    Kenneth


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Getting the file size of an email attachment

    Identify the types of the objects in the one line of code you've posted.

Similar Threads

  1. Problem with the PDF file attachment subject
    By Tim84 in forum Java Theory & Questions
    Replies: 1
    Last Post: June 17th, 2013, 08:16 AM
  2. Replies: 4
    Last Post: February 14th, 2012, 03:28 PM
  3. Error occured during attachment of file using java.
    By kaliyaodi in forum What's Wrong With My Code?
    Replies: 5
    Last Post: July 4th, 2011, 05:30 PM
  4. Limit File Size or Request Size
    By tarek.mostafa in forum Java Servlet
    Replies: 3
    Last Post: June 12th, 2010, 04:28 PM
  5. Limit File Size or Request Size
    By tarek.mostafa in forum JavaServer Pages: JSP & JSTL
    Replies: 3
    Last Post: June 11th, 2010, 07:21 AM