I have a .Net app, which works with SFDC via REST API. Not so long time ago we faced with big files. Usually they were around 2-3 Mb and it was OK for both .Net app and SFDC. Now there are some changes in app, which generate those files (file is archive which contains a number of files, the big part of the archive is a png file). As I can see from documentation, neither SOAP API, nor REST API allow me to create an Attachment with size more than 5 Mb. This Attachment is linked to a custom object. Is there any way to upload or create smth to attach file to an object? Maybe through Email attachments. They allow to attach 25 Mb. Maybe upload somehow asynchronously? But how?

  • Have you checked the API version being used when you try with SOAP and REST? Sep 12, 2014 at 16:05
  • I always use (current version)-1 Sep 14, 2014 at 10:07
  • I'm in progress of writing a desktop app to test REST and SOAP APIs for Attachment object. Sep 14, 2014 at 10:09

2 Answers 2


With Summer '14 release, file size limits for attachments were increased to 25MB, so you should be fine:


  • Yes, it's true. But I'm looking for a way to attach a file to an object via something, and not manually via web interface. I want .Net app to send somehow this file to SFDC. Sep 12, 2014 at 15:06
  • 3
    the attachment size limit is at the attachment level, not the API, so if the limit has been increased them it should also apply to the API calls as well.
    – superfell
    Sep 12, 2014 at 16:36
  • Use the script on this blog to bypass the limit kevansfdc.blogspot.com/2017/05/…
    – Kevan
    May 15, 2017 at 10:31

I assume my question was not very accurate. The problem was that we use custom REST API. And the problem was in Heap Size in our code.

After I tried 'standard' Force.com REST API for Attachment object I was able to upload 24 MB file to my custom object.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .