(pdfUrl, docId, templateId)
| 2963 | }; |
| 2964 | |
| 2965 | export const getSignedUrl = async (pdfUrl, docId, templateId) => { |
| 2966 | //use only axios here due to public template sign |
| 2967 | const token = { |
| 2968 | "X-Parse-Session-Token": localStorage.getItem("accesstoken") |
| 2969 | }; |
| 2970 | const axiosRes = await axios.post( |
| 2971 | `${localStorage.getItem("baseUrl")}/functions/getsignedurl`, |
| 2972 | { |
| 2973 | url: pdfUrl, |
| 2974 | docId: docId || "", |
| 2975 | templateId: templateId || "" |
| 2976 | }, |
| 2977 | { |
| 2978 | headers: { |
| 2979 | "content-type": "Application/json", |
| 2980 | "X-Parse-Application-Id": localStorage.getItem("parseAppId"), |
| 2981 | ...token |
| 2982 | } |
| 2983 | } |
| 2984 | ); |
| 2985 | const url = axiosRes.data.result; |
| 2986 | return url; |
| 2987 | }; |
| 2988 | //download base64 type pdf |
| 2989 | export const fetchBase64 = async (pdfBase64, pdfName) => { |
| 2990 | // Create a Blob from the Base64 string |
no outgoing calls
no test coverage detected