IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only

How to fetch Salesforce Attachment file content with django-salesforce?

  • 1.  How to fetch Salesforce Attachment file content with django-salesforce?

    Posted Wed January 10, 2018 05:48 AM

    I’m developing a Django 1.11 app serving as a UI for some Salesforce Objects using django-salesforce for the communication with Salesforce.

    I have to give users the option to download files from Salesforce Attachment objects related to their Contact.

    Django Attachment model on my_app/models.py

    class Attachment(models.Model):
    parent = models.ForeignKey(Contact, models.DO_NOTHING,
    sf_read_only=models.NOT_UPDATEABLE)
    name = models.CharField(max_length=255, verbose_name=‘File Name’)
    content_type = models.CharField(max_length=120, blank=True, null=True)
    body_length = models.IntegerField(sf_read_only=models.READ_ONLY)
    body = models.TextField()


    On this Attachment model I can access the rest URL for the file content on the body field, but not the actual content.

    Is there a way of getting file content from the Attachment without having to implement an OAuth client just for this?


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-General