[SalesForce] File Upload of size more than 50 MB to Chatter Feeds through Visual Force

I am trying to implement upload files to Custom object's record through Visualforce and Apex.

I have enabled FeedItem for the object. I am using Blob as file type but Visualforce is not allowing me to attach file more than 10 MB.

While I am using chatter:feed entityId="{!Document.Id}" component in VF page, its file option allow me to upload more than 50 mb file.

What I have to do, so that Visual force should provide similar functionality as Chatter File and allow me to upload at least 50 MB file .

Best Answer

You can't do this via Visualforce - the limit is clearly documented at:

http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_inputFile.htm

Note: The maximum file size that can be uploaded via Visualforce is 10 MB.

You should be able to upload larger files via the REST API. The forcetk should help you in this situation too. For an example that uploads a photo via REST, check out Pat Patterson's blog post:

https://developer.salesforce.com/blogs/developer-relations/2013/11/uploading-photos-to-chatter-files-with-html5.html