function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
David VPDavid VP 

SOAP DIME attachments support in Apex ?

This is probably one for the guru's :

Is there any support for DIME attachments in Apex ? (I'm trying to achieve an 'Apex only' integration with Amazon S3)

So far a can list buckets, have users download files etc ... but for sending the files from the SFDC server to Amazon it looks my only valid option would be using DIME attachments in the SOAP calls.


David
SuperfellSuperfell
No, there's no support for DIME in Apex. Why don't you use the REST API to S3 instead ?
David VPDavid VP
Thanks Simon,

I had also looked at the HTTP RESTful services classes - even though I have a natural preference for SOAP, but that's just me.


However : It looks like I'm gonna hit some serious roadbumps there too ...
In order to get files from the SFDC servers to s3, I would need to POST these files ... I see no methods in the HttpRequest object where I can get a reference to the InputStream (as for example in Java) to pass the binary file.
The setBody() method works but is limited to 100KB according to the docs, and as far I can see only useful for plain/text content.

Is there an other way that I'm not seeing ? (I must admit that I've only spent a couple of hours in the Amazon docs up until now).
Or should I call it a day and find another pet project ?



David
jg@hhsjg@hhs

Could you elaborate on how your users are able to download from Amazon S3?  I'm having trouble with this...

David VPDavid VP

Have a look at the Salesforce Amazon Toolkit :

 

http://aws.amazon.com/solutions/global-solution-providers/salesforce/

 

All examples are in there (including downloading files from S3 buckets).

GoForceGoGoForceGo

David, I am stuck where you were...looking for native Apex implementation....

 

The tookit includes a  SOAP Implementation of PutObjectInline, which will do the job for 1MB or less files.

 

This new thread says the same...seems like Content-Transfer-Encoding header is NOT supported by amazon s3...

 

http://boards.developerforce.com/t5/Apex-Code-Development/RESTful-WebService-Call-Using-PUT-Method-Binary-Data/m-p/207838#M36591

 

 

GoForceGoGoForceGo

Dave,


Did you ever attempt to get the rest service working and were you able to do it?

 

I am getting the signaturedoesnotmatch.


I posted my code at this thread. If you got yours working, wondering if you can see what I am doing wrong.

 

http://boards.developerforce.com/t5/Apex-Code-Development/RESTful-WebService-Call-Using-PUT-Method-Binary-Data/m-p/207838#M36591

 

David VPDavid VP

You're reviving a very old thread :-)

 

To answer your question : Yes we got it working. The results can be found here (in our Amazon toolkit) :

http://wiki.developerforce.com/index.php/Installing_Force_for_Amazon_Web_Services

 

Install it and you'll see the REST API for the EC2 commands. (S3 is implemented via SOAP).

GoForceGoGoForceGo

Yes Indeed. I am reviving an old thread. I have a client who wants to use s3 for storage and I want to trying to see how to use it natively. I started with the toolkit and found that SOAP scales to 1MB with PutObjectInline, but beyond that it won't work. I am hoping to push it to 3MB using the rest API.

 

I just looked at the EC2 code, and I guess devil is in the details. I am trying to do similar stuff for S3 and keep getting signature does not match error.

I am wondering what I am doing wrong!

 

 

 

 

 

S3-LinkS3-Link
S3- Link is FREE App for Salesforce - Amazon Connector. Its also available on Appexchange. 

 1. Create Amazon S3 file for standard Salesforce attachment through
    trigger.
 2. Upload attachments on Amazon S3 and create reference in Salesforc to
    access those attachments
 3. Attach file related to any Salesforce object on Amazon.
 4. Unlimited free storage.
 5. Auto backup Event logs / inbound email attachments.
 6. Server Side Encryption: AES-256
 7. No file size limit for upload.
 8. File access control capabiliy.
 9. Track file downloads by users.
 10. File exlorer capability.

https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000CW1OXEA1

Here is our email address. Let us know if you have any query.
support@neiloncloud.com

Thanks.