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.common.js
CHANGED
|
@@ -31269,6 +31269,7 @@ const addAndCleanDocument = async (fileUrl, options = {}) => {
|
|
|
31269
31269
|
let home_page = window.smardaten_api_context_path;
|
|
31270
31270
|
let finalUrl = `${home_page}/storage_area/public${fileUrl}`;
|
|
31271
31271
|
let fileType = finalUrl.split(".").pop().toLowerCase();
|
|
31272
|
+
let fileName = options.fileName ? `${options.fileName}.${fileType}` : dify_extractFilenameFromUrl(finalUrl);
|
|
31272
31273
|
fileType = getDifyFileType(fileType);
|
|
31273
31274
|
let loginUserData = window.anonymousIsLogin || window.currentUser;
|
|
31274
31275
|
let user_id = options.userID || loginUserData?.id;
|
|
@@ -31279,7 +31280,7 @@ const addAndCleanDocument = async (fileUrl, options = {}) => {
|
|
|
31279
31280
|
let queryData = {
|
|
31280
31281
|
params: {
|
|
31281
31282
|
inputs: {
|
|
31282
|
-
fileName:
|
|
31283
|
+
fileName: fileName
|
|
31283
31284
|
},
|
|
31284
31285
|
files: [{
|
|
31285
31286
|
type: fileType,
|