Skip to main content
Srinivas Reddy Nandhikonda (JDE) 님이 #Visualforce에 질문했습니다

how can i get selected file name (forcecom_workbook.pdf) as attachment file name. Please find below image to get file name in textbox. and need to get the size in MBs instedad of bytes.

Attachments File Name in Visual force page & Controller
답변 1개
  1. 2015년 6월 8일 오전 8:20
    Hai

    I think Document Rules will be same here also .

    Document Rules

    1)You can upload documents that have file names of up to 255 characters 

    including the extension. 

    2)The size limit for any document you upload is 5 MB. 

    The maximum size for a custom-app logo is 20 KB.

    <apex:inputFile value="{!contract.body}" fileName="{!contractName}"/>

    public String contractName {get;set;}

     

    public Attachment

      get {

          if (contract == null) {

                contract = new Attachment();

           }

          return contract;

      }

      set;

    }

    You neeed more information go to this url its useful 

    http://bobbuzzard.blogspot.in/2011/01/uploading-multiple-attachments-via.html

    Please select this answer is useful you

     
0/9000