Skip to content
Snippets Groups Projects
Unverified Commit 02f877b2 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Make getPDFFileBase64Content more resilient (#4)

parent 8a20fde7
No related branches found
No related tags found
No related merge requests found
Pipeline #10228 passed with warnings
...@@ -20,7 +20,7 @@ export const findObjectInApiResults = (identifier, results, identifierAttribute ...@@ -20,7 +20,7 @@ export const findObjectInApiResults = (identifier, results, identifierAttribute
}; };
export const getPDFFileBase64Content = (file) => { export const getPDFFileBase64Content = (file) => {
return file.contentUrl.replace("data:application/pdf;base64,", ""); return file.contentUrl.replace(/data:\s*application\/pdf;\s*base64,/, "");
}; };
export const convertDataURIToBinary = (dataURI) => { export const convertDataURIToBinary = (dataURI) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment