cancel
Showing results for 
Search instead for 
Did you mean: 

Assign client side generated pdf to Fileuploader (jspdf)

antonette_oberholster
Active Contributor
0 Kudos

Hi guys

I'm generating a pdf on the client side using jspdf. Now I have the file so there is no need for the "browse" feature, I just need to attach it to the fileuploader but I can't seem to find the property to set the actual file (to be uploaded to gateway).

My pdf file value looks like this: "%PDF-1.3 3 0 obj <</Type /Page /Parent 1 0 R....."

How do I attach it to file uploader?

Thanks

Antonette

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member467951
Participant
0 Kudos

Looks like jspdf api is returning with the blob of the pdf, try doing one of the below

1) Save the blob into a temporary file (https://stackoverflow.com/questions/27553617/convert-blob-to-file) and continue with your process as there is a file now

2) Since you already have the file contents, submit this to the ODATA request to create the attachment, I dont think you will need a physical file on the client to perform this activity.