Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Unanswered

javascript attachment

(0) ShareShare
ReportReport
Posted on by 437

 Ok.  I am trying to have a form on my portal that has 3 text input fields for:   to, subject, body,  and attachment (for an email).

I am trying to send (ajax) these inputs to a power automate flow. 

The text input fields work just fine.   The flow gets them and uses them to create and send an email.

Getting the attachment to the flow has been problematic.

NOTE:  there is no ENTITY involved here.  this is not being done using additional settings.

The attachment input field is of type "file" and it does allow me to choose a file from my local computer using a file selector dialog.

I guess I am missing what to do with the file that is returned from the dialog and how it can be sent to the Flow.

Can anyone understand this?  I definitely need help..files; var request = { "url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json" }, "data": secfile, };

I have been able to see attibutes of the file, like file.name

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans