2

I want to send a CSV Attachment file from salseforce to egnyte for which I want to pass a url to Egnyte System in such a way that Egnyte system can directly download That Attachment(Not hyperlink) I have tried url as follows but it was throwing "Read Time Error"

/servlet/servlet.FileDownload?file=' + doc.Id

URL.getSalesforceBaseUrl().toExternalForm() +'/' + doc.id

4
  • What's the size of the CSV file?
    – Force Hero
    Commented Dec 11, 2014 at 9:10
  • [3 MB] is the size
    – sagar
    Commented Dec 11, 2014 at 9:58
  • Hmm... ok, if you debug out the full URL that you are passing to egnyte and then copy and paste it into a browser does it work ok?
    – Force Hero
    Commented Dec 11, 2014 at 10:03
  • /servlet/servlet.FileDownload?file=' + doc.Id URL that is - also is the document marked as externally available?
    – Force Hero
    Commented Dec 11, 2014 at 10:04

2 Answers 2

2

Ok, its just occurred to me you can't make files (other than images) externally available in that way. You can instead use Content and Content Deliveries to make the file available externally. Please see this documentation:

https://help.salesforce.com/apex/HTViewHelpDoc?id=content_delivery_about.htm&language=nl

1

I was able to solved it by converting csv body into binary and than I used setBodyAsBlob(body) method in http request and it worked.

You must log in to answer this question.

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