MCPcopy Index your code
hub / github.com/OpenSignLabs/OpenSign / getSignedUrl

Function getSignedUrl

apps/OpenSign/src/constant/Utils.js:2965–2987  ·  view source on GitHub ↗
(pdfUrl, docId, templateId)

Source from the content-addressed store, hash-verified

2963};
2964
2965export 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
2989export const fetchBase64 = async (pdfBase64, pdfName) => {
2990 // Create a Blob from the Base64 string

Callers 7

handleSubmitFunction · 0.90
handleDownloadFunction · 0.90
handleDownloadFunction · 0.90
handleDownloadFunction · 0.90
handleDownloadPdfFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected