diff --git a/app/client/src/constants/FieldExpectedValue.ts b/app/client/src/constants/FieldExpectedValue.ts index 6ae293519e..f01eb8e017 100644 --- a/app/client/src/constants/FieldExpectedValue.ts +++ b/app/client/src/constants/FieldExpectedValue.ts @@ -135,7 +135,6 @@ const FIELD_VALUES: Record< allowedFileTypes: "Array", isRequired: "boolean", isVisible: "boolean", - uploadedFileUrls: "string", // onFilesSelected: "Function Call", }, CHECKBOX_WIDGET: { diff --git a/app/client/src/utils/autocomplete/EntityDefinitions.ts b/app/client/src/utils/autocomplete/EntityDefinitions.ts index 7717b0f0bf..8fb2afab5d 100644 --- a/app/client/src/utils/autocomplete/EntityDefinitions.ts +++ b/app/client/src/utils/autocomplete/EntityDefinitions.ts @@ -231,7 +231,6 @@ export const entityDefinitions = { isVisible: isVisible, files: "[file]", isDisabled: "bool", - uploadedFileUrls: "string", }, LIST_WIDGET: (widget: any) => ({ "!doc": diff --git a/app/client/src/widgets/FilepickerWidget.tsx b/app/client/src/widgets/FilepickerWidget.tsx index 73310e59f1..913079e89c 100644 --- a/app/client/src/widgets/FilepickerWidget.tsx +++ b/app/client/src/widgets/FilepickerWidget.tsx @@ -8,10 +8,7 @@ import Webcam from "@uppy/webcam"; import Url from "@uppy/url"; import OneDrive from "@uppy/onedrive"; import { VALIDATION_TYPES } from "constants/WidgetValidation"; -import { - EventType, - ExecutionResult, -} from "constants/AppsmithActionConstants/ActionConstants"; +import { EventType } from "constants/AppsmithActionConstants/ActionConstants"; import { DerivedPropertiesMap } from "utils/WidgetFactory"; import Dashboard from "@uppy/dashboard"; import shallowequal from "shallowequal"; @@ -157,17 +154,6 @@ class FilePickerWidget extends BaseWidget< isTriggerProperty: false, validation: VALIDATION_TYPES.BOOLEAN, }, - { - propertyName: "uploadedFileUrlPaths", - helpText: - "Stores the url of the uploaded file so that it can be referenced in an action later", - label: "Uploaded File URLs", - controlType: "INPUT_TEXT", - placeholderText: 'Enter [ "url1", "url2" ]', - inputType: "TEXT", - isBindProperty: true, - isTriggerProperty: false, - }, { propertyName: "isDisabled", label: "Disable", @@ -185,7 +171,7 @@ class FilePickerWidget extends BaseWidget< children: [ { helpText: - "Triggers an action when the user selects a file. Upload files to a CDN here and store their urls in uploadedFileUrls", + "Triggers an action when the user selects a file. Upload files to a CDN and stores their URLs in filepicker.files", propertyName: "onFilesSelected", label: "onFilesSelected", controlType: "ACTION_SELECTOR", @@ -385,7 +371,6 @@ class FilePickerWidget extends BaseWidget< dynamicString: this.props.onFilesSelected, event: { type: EventType.ON_FILES_SELECTED, - callback: this.handleFileUploaded, }, }); @@ -393,22 +378,6 @@ class FilePickerWidget extends BaseWidget< } }; - /** - * sets uploadFilesUrl in meta propety and sets isLoading to false - * - * @param result - */ - handleFileUploaded = (result: ExecutionResult) => { - if (result.success) { - this.props.updateWidgetMetaProperty( - "uploadedFileUrls", - this.props.uploadedFileUrlPaths, - ); - - this.setState({ isLoading: false }); - } - }; - componentDidUpdate(prevProps: FilePickerWidgetProps) { super.componentDidUpdate(prevProps); if ( @@ -469,7 +438,6 @@ export interface FilePickerWidgetProps extends WidgetProps, WithMeta { onFilesSelected?: string; fileDataType: FileDataTypes; isRequired?: boolean; - uploadedFileUrlPaths?: string; } export default FilePickerWidget;