Skip to Content

Assign client side generated pdf to Fileuploader (jspdf)

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jul 18, 2017 at 02:05 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded