form-craft-package 1.1.7 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "form-craft-package",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -163,9 +163,9 @@ export const DynamicFormButtonRender = memo(
163
163
  const queryParams = objectToQueryParams(values)
164
164
  console.log(queryParams)
165
165
  const feDomainUrl = window.location.origin
166
- const fullUrl = `${feDomainUrl}/${location.pathname}?${queryParams}`
166
+ const fullUrl = `${feDomainUrl}${location.pathname}?${queryParams}`
167
167
  console.log(fullUrl)
168
- const blobName = 'abc'
168
+ const blobName = 'abc.pdf'
169
169
  client
170
170
  .post(`/api/attachment/pdf/${companyKey}/${fullUrl}/${blobName}`)
171
171
  .then((res) => {
@@ -231,7 +231,11 @@ export const DynamicFormButtonRender = memo(
231
231
  const signatureField = formRef.getFieldValue(FormPreservedItemKeys.HasSignature)
232
232
  if (!!signatureField) {
233
233
  const signatureBase64 = formRef.getFieldValue(signatureField)
234
- const blobName = await saveFile(base64ToBlob(signatureBase64), 'signature', isPublic ? companyKey : '')
234
+ const blobName = await saveFile(
235
+ base64ToBlob(signatureBase64),
236
+ 'signature.png',
237
+ isPublic ? companyKey : '',
238
+ )
235
239
 
236
240
  if (!!blobName) formRef.setFieldValue(signatureField, blobName)
237
241
  }