Hello!
I have a third party document system in a Blazor API.
I am trying to send the file from the sfUploader to the api. The api does not have SyncFusion and can not. The api uses MinimalAPI and FastEndpoints. I have the uploader in an sfDialog. I don't want anything to send on the ValueChanged event. I only want activity when the user clicks the OK button on the dialog. Also, I am trying to avoid saving the file to disk as there is no need. I am using the ValueChanged event to save the file in the args to a form level UploadFiles variable so I can use it on the OnValidModel event. I don't see any other way to get the file. The GetFilesDataAsync and GetFileDetails methods don't seem to contain the actual file. Also, no matter which file object I uses - the UploadFile or Fileinfo, the RawFile property is always empty. Assume for this example I'm sending a pdf.
The steps I think are needed are:
Convert file to byte array
Send to api
Stream byte array back into a pdf. (Save file as a test only)
Put the pdf into the document system type variable.
How do I get the pdf (or any type) of file) from the uploader and put it in a byte array?
Thank you