+ Start a Discussion
Dagny FernandesDagny Fernandes 

Getting View state error on uploading of attachments from VF page

Hi Friends,

I have a requirement to Upload List of attachments from VF page in one click but iam getting a view state error on uploading a bulk data. so I tried useing "Remoting" even in remoting there are some limitation in passing the parameters and size. Iam passing the list of attachement each Attacmnent may consists of MB's of file. The challengeing part is there is a option to upload 50 attachments in one go also, there are 5 data points in which each data point may have 10 attachment to upload. based on the values the page rereders, the below is the image of the VF page.
Need Help Asap.
Thanks in Advance.

User-added image

Thanks in advance...
AshwaniAshwani
First thing, you should use javascript remoting to upload file. Also, make sure you are not maintaning state of variable handling attachment (Blob). Transient keyword would be used to upload attachement. You can not upload 50 attachment in one go you will have to send them one by one dependong on size.