ApplaudSolutions / Applaud-Workato-Connector

Code pertaining to the Applaud Workato Connector
0 stars 0 forks source link

Download file action #26

Closed duncancasemore closed 3 years ago

duncancasemore commented 4 years ago

Summary

  1. As a Integration Designer
  2. I want to build recipes that download files from Applaud
  3. so that I can use the files in other apps

Acceptance Criteria

  1. I can select the Download file action
  2. I can enter the File Id of the file I wish to download. I see this is required and of text type
  3. When I use this action I see that this file downloads from Applaud
  4. I see that I can use the downloaded file's properties as datapills in later actions. Specifically, I can use File Id, URL, Filename, Mime Type and File Contents (file contents is binary bytes of the file)

Wireframes and mockups

Download file action

Applaud action download a file.png

Notes

None

Developer Testing

Requestor: leave this section blank Developer: complete this section during commit/pull request

Positive testing:

Add all the things that you have checked whilst completing this story here, it should be written in a non-technical way, and a lot of this can probably be taken from the acceptance criteria, here are two different examples:

Negative testing:

Here you list the things you have checked where your code needs to show an error, handle unusual/bad input/config gracefully, or may impact separate features that use or depend on the same code. Pause and think -- they may not be obvious! Examples:

e2e test links and description:

vinaykumarkasireddy commented 3 years ago
  1. [x] I can select the Download file action
  2. [x] I can enter the File Id of the file I wish to download. I see this is required and of text type image.png
  3. [x] When I use this action I see that this file downloads from Applaud image.png
  4. [x] I see that I can use the downloaded file's properties as datapills in later actions. Specifically, I can use File Id, URL, Filename, Mime Type and File Contents (file contents is binary bytes of the file) image.png Note: File contents can not be downloaded with applaud cloud apis. Use files by workato utility to download the file content using the URL.
ssarap commented 2 years ago

@vinaykumarkasireddy I think the URL property that is exposed as Output Datapill of Download action doesn't seem to Work. We need to use FileHref property to download the File from the URL. Please expose the FileHref property well. image

karthmoh commented 2 years ago

@ssarap THanks for the update. As discussed this is a blocker for the KCH project as they have to raise a case where attaching supporting documents is very important. Please prioritize the same.

Regards Karthik.

ssarap commented 2 years ago

@lewie6 When we are using the URL value of the File, unable to access it now, has something changed in file access as we could now see a new property "isPrivate" true in the latest cloud response. Please let us know if we can use fileHref property to access the file. @duncancasemore FYI. Once @lewie6 confirms we need to release this change in EU and global regions.

lewie6 commented 2 years ago

@ssarap isPrivate was added around April/May 2021 It is for signed files https://github.com/ApplaudSolutions/applaud-cloud/issues/2531

duncancasemore commented 2 years ago

@lewie6 what is isPrivate and why would that mean that a file can no longer be downloaded via the Workato connector?

lewie6 commented 2 years ago

@duncancasemore It is for signed/private/secure files ApplaudSolutions/applaud-cloud#2531

duncancasemore commented 2 years ago

@lewie6 yes I guessed that. Is it a flag that should be set in the API? If so, what does it mean if it's set to true/false? How does the API download the file in either case?

lewie6 commented 2 years ago

@duncancasemore isPrivate: true/false is a flag for if the file is secure or not

@ssarap please raise a cloud story: All API Keys role should get signed URLs when hitting an API

I think the requestor (in this case wrokarto) should specify which file property they want signed, eg; /api/person?signFile=cv, and maybe this should be limited to the first 10 records?

duncancasemore commented 2 years ago

@lewie6 don't we get a fileId in the above example? I think already the connector uses the fileId to hit the File endpoint to get the url. So we can't we do something with this call? Eg, get file/{id} returns a secured url?

lewie6 commented 2 years ago

@duncancasemore yes, if that is how we get files. @ssarap please confirm

ssarap commented 2 years ago

Yes, we are getting fileHref with the accessible URL. Can we use that Lewis?

On 25-Jan-2022, at 11:01 AM, lew @.***> wrote:

 @duncancasemore yes, if that is how we get files. @ssarap please confirm

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.

-- Disclaimer: This message (including any attachments) is confidential and intended solely for the person or organization to whom it is addressed. It may contain privileged and confidential information. If you are not the intended recipient, you should not copy, distribute or take any action in reliance on it. If you have received this message in error, please notify us immediately by telephoning or emailing the sender. This footnote also confirms that this email message has been scanned for the presence of computer viruses.

lewie6 commented 2 years ago

Hey @ssarap, when you guys say "accessible URL" and "file/{id}", do you mean "/api/assets/{id}"? It is not 100% clear what you mean Please add that detail to the cloud story

vinaykumarkasireddy commented 2 years ago

Yes @lewie6, Using "/api/assets/{id}" api. 'URL' property from the above api response is used to download the file. But, it is not working now.

Able to download the file using 'fileHref' property of the api response. Can we use this property instead of 'URL'?

lewie6 commented 2 years ago

@vinaykumarkasireddy oh I see, so fileHref already works but URL property doesn't work. Sorry, I didn't understand what you meant before Yes I can see in screenshot now, fileHref already has the signed token So yes use fileHref, no need for cloud story

hgajula-applaud commented 2 years ago

@vinaykumarkasireddy @ssarap with the above change, ie, using fileHref, do we still need to release the changes to US and EU regions?

vinaykumarkasireddy commented 2 years ago

Yes @hgajula-applaud, We need to release the changes to US and EU regions.

ssarap commented 2 years ago

@vinaykumarkasireddy Can you change the URL to point to fileHref property in download and upload actions.

karthmoh commented 2 years ago

Hi @ssarap

Could you please let us know when this change will be deployed onto TA-EU.

Thanks Karthik

ssarap commented 2 years ago

@karthmoh We have requested Duncan to release the connector. This is expected to happen in short time.

karthmoh commented 2 years ago

Thanks @ssarap

duncancasemore commented 2 years ago

@ssarap @karthmoh this is done

karthmoh commented 2 years ago

Thanks @duncancasemore. I could see the update in TA but not in TA-EU.

Regards Karthik