Uploading to Storage Bucket

We have a requirement to have pdfs uploaded to a stoage bucket.

I have setup and External App, but what read write permissions do I need to have set to be able to do this?

I know I have to Obtain a Write URI, but where do I get the bearer access token? Or do I need to do an auth request before any of this to get bearer token?

@rmorgan

Refer this thread

Hey! That’s a super common need!
The simplest and most robust way to do this is using the official activity.
First, make sure you have the UiPath.Persistence.Activities package installed.
Then, just drop in the Upload Storage File activity. You only really need three things-

  1. BucketName: The exact name of your bucket from Orchestrator.
  2. LocalFile- The full path to the file on the machine running the job.
  3. Path- What you want the file to be named inside the bucket (e.g., “reports/May_Data.xlsx”).

Pro-Tip- If it fails, 99% of the time it’s a permission issue! Make sure the Robot Role has the Storage Buckets - Create permission on that Orchestrator folder.
Hope that helps you out!

that would be fine but they are coming from an external application, so a direct link is required

Hi @rmorgan

Is the requirement to do this specifically using API?

There is also an activity available to upload files to storage bucket.

If you only want to use api, refer below post

@rmorgan

use client ID and secret you have from external app to hit auth api and get bearer token

permissions needed are these

You can check swagger for more details

cheers