isdata-customer-sdk 0.1.69 → 0.1.70
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/dist/index.umd.js
CHANGED
|
@@ -31279,6 +31279,7 @@ const addAndCleanDocument = async (fileUrl, options = {}) => {
|
|
|
31279
31279
|
let home_page = window.smardaten_api_context_path;
|
|
31280
31280
|
let finalUrl = `${home_page}/storage_area/public${fileUrl}`;
|
|
31281
31281
|
let fileType = finalUrl.split(".").pop().toLowerCase();
|
|
31282
|
+
let fileName = options.fileName ? `${options.fileName}.${fileType}` : dify_extractFilenameFromUrl(finalUrl);
|
|
31282
31283
|
fileType = getDifyFileType(fileType);
|
|
31283
31284
|
let loginUserData = window.anonymousIsLogin || window.currentUser;
|
|
31284
31285
|
let user_id = options.userID || loginUserData?.id;
|
|
@@ -31289,7 +31290,7 @@ const addAndCleanDocument = async (fileUrl, options = {}) => {
|
|
|
31289
31290
|
let queryData = {
|
|
31290
31291
|
params: {
|
|
31291
31292
|
inputs: {
|
|
31292
|
-
fileName:
|
|
31293
|
+
fileName: fileName
|
|
31293
31294
|
},
|
|
31294
31295
|
files: [{
|
|
31295
31296
|
type: fileType,
|