3

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? – Daniel Hoechst Sep 12 '14 at 16:05
  • I always use (current version)-1 – Andrii Muzychuk Sep 14 '14 at 10:07
  • I'm in progress of writing a desktop app to test REST and SOAP APIs for Attachment object. – Andrii Muzychuk Sep 14 '14 at 10:09
2

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

http://docs.releasenotes.salesforce.com/en-gb/summer14/release-notes/rn_general_attachment_size_increase.htm

  • 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. – Andrii Muzychuk Sep 12 '14 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 '14 at 16:36
  • Use the script on this blog to bypass the limit kevansfdc.blogspot.com/2017/05/… – Kevan May 15 '17 at 10:31
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.