Hi @abhinav23 ,
I actually do this in an app, but it is a bit tricky, so please follow closely each step. Firstly I am assuming there is only one attachment in the control.
In the example below, the Attachment control is called acAttachOD and I have a hidden Image control called imAttachOD which has the Image property of
First(acAttachOD.Attachments).Value
Now the Flow is fairly simple

and on the button to save (my Flow is called AttachtoOneDrive)
With(
{
_JSON:
With(
{
_JSONI:
JSON(
imAttachOD.Image,
JSONFormat.IncludeBinaryData
)
},
Mid(
_JSONI,
Find(
",",
_JSONI
) + 1,
Len(_JSONI) -
Find(
",",
_JSONI
) - 1
)
)
},
AttachtoOneDrive.Run(
First(acAttachOD.Attachments).Name,
_JSON
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps