0

When file is uploaded to onedrive I need to trigger java code to read content of the file. This java code is to be made as docker image and pushed to azure container registry. What steps should I take to pass this file as an input to java code and integrate these azure services together so that it can be read from inside docker container?

I tried using Azure functions that can trigger java code but unable to pass the file content to java code which has to be present in azure container registry. I read about webhooks but webhooks needs URL to post the request. What URL should I used and how can I pass the file/file content in post request that I couldn't identify.

Lani
  • 178
  • 1
  • 2
  • 9

1 Answers1

0

I have posted an answer for the similar thread, please check and see if it helps.

Possible duplicate of [Trigger java code to download file from onedrive when file is uploaded to onedrive]

(Trigger java code to download file from onedrive when file is uploaded to onedrive)

If you dont want to create logic app for the same its fine, you could have an implementation like below

using System;

public static void Run(string input, out string output, TraceWriter log)
{
    output = input;
}

Bindings

{
"bindings": [
    {
      "type": "apiHubFileTrigger",
      "name": "input",
      "direction": "in",
      "path": "input-cs/{name}",
      "connection": "dropbox_DROPBOX"
    },
    {
      "type": "apiHubFile",
      "name": "output",
      "direction": "out",
      "path": "output-cs/{name}",
      "connection": "Onedrive_Connection"
    }
  ],
  "disabled": false
}

Hope it helps.

Mohit Verma
  • 5,140
  • 2
  • 12
  • 27
  • Instead of posting answers to duplicates, please flag / vote to close as duplicate instead and keep your answers in one place. – Mark Rotteveel Apr 05 '19 at 11:35
  • Yes, that answer was posted by me only, but i believe we cant refer that answer to make it duplicate until it is accepted as an answer. Isn't it right? As i tried from my side it didn't worked. Anyway Thanks for marking it duplicate. – Mohit Verma Apr 05 '19 at 11:48
  • No given that question was asked by the same person, you can always vote as duplicate. And if it was posted by a different user, then an upvoted **or** accepted answer is sufficient to be able to close as duplicate. – Mark Rotteveel Apr 05 '19 at 11:50
  • Cool. Will keep tab next time :) – Mohit Verma Apr 05 '19 at 11:52