Sending a file attachment using Web activity in Azure Data Factory Body

DannyV-2978 6 Reputation points

I am trying to send a PDF file to an HTTP endpoint and keep getting "ERROR: Unhandled" which is not helpful. I am using a For Each and inside that I have a Web activity that is configured as shown:
in the body I have this ('file=D:/Data/Vetted/Attachment/',item().cleanURL)
My input results is show below.


Why is it not sending that file out?

I have tried so many things.

Any help would be much appreciated.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,442 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. DannyV-2978 6 Reputation points

    Thanks, That is what I kind of figure after various iterations. I am now working on a powershell script to pass the file via an Azure function instead.
    I believe that should work.

    1 person found this answer helpful.
    0 comments No comments

  2. MartinJaffer-MSFT 26,011 Reputation points

    Hello @Anonymous and thank you for your question.

    I notice that what you are putting in the body of your web activity looks like a filepath. Is this for something that lives on your local computer? Data Factory does not have the ability to take a file from your computer in this manner.

    If you want to send data using the web activity, you need to put the contents of the file in the body.

    If you put the file in a web-accessible storage like an Azure Storage Account or ADLS, it is possible to use another web activity to fetch the contents via the REST API's.

    However, I think it may be easier to use something other than Data Factory for this.

    0 comments No comments