From 3514f40a3c6d9de7a44e75335888421245bfee8f Mon Sep 17 00:00:00 2001 From: oblomov-dev <102328295+oblomov-dev@users.noreply.github.com> Date: Fri, 15 Nov 2024 12:17:38 +0100 Subject: [PATCH] Fix file upload (#1540) * fix file upload * Update App.controller.js * Update README.md --- README.md | 14 ++++++++------ app/webapp/controller/App.controller.js | 2 +- src/01/03/z2ui5_cl_app_app_js.clas.abap | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d8de1062..7f259d83 100644 --- a/README.md +++ b/README.md @@ -56,15 +56,17 @@ This project greatly benefits from its [contributors](https://github.com/abap2UI * Developed on an [ABAP Cloud Dev Trial 2022](https://hub.docker.com/r/sapse/abap-cloud-developer-trial) [(hosted by Nuve Platform)](https://www.nuveplatform.com/) #### What's Next? +Start exploring abap2UI5: * [Quickstart](https://abap2ui5.github.io/docs/get_started/quickstart.html) – Install and get started with your first abap2UI5 app -* [Samples](https://abap2ui5.github.io/docs/get_started/samples.html) – Learn through hands-on examples and start building your own apps +* [Guide](https://abap2ui5.github.io/docs/) - Find answers to your questions or dive deeper into the project * [Addons](https://abap2ui5.github.io/docs/addons/addons.html) – Extend abap2UI5’s capabilities to fit your needs * [Apps](https://abap2ui5.github.io/docs/addons/apps.html) – Discover and try out abap2UI5 apps -#### Get Involved -* Have questions, feedback, or bugs to report? Check out the [documentation](https://abap2ui5.github.io/docs/) or create an [issue](https://github.com/abap2UI5/abap2UI5/issues) -* Interested in contributing? Review our [contribution guidelines](https://abap2ui5.github.io/docs/resources/contribution.html) to get started -* Follow us on [LinkedIn](https://www.linkedin.com/company/abap2ui5) and consider [sponsoring](https://abap2ui5.github.io/docs/resources/sponsor.html) our dedicated developer +Get involved: +* [Issues](https://github.com/abap2UI5/abap2UI5/issues) - Report bugs or provide feedback to improve abap2UI5 +* [Contribution](https://abap2ui5.github.io/docs/resources/contribution.html) - Get started with contributing to the project +* [LinkedIn](https://www.linkedin.com/company/abap2ui5) - Follow us for updates, insights, and community highlights +* [Sponsorship](https://abap2ui5.github.io/docs/resources/sponsor.html) - Support our dedicated developer and help drive innovation -_We welcome all contributions! Share your knowledge, hunt for bugs, submit a PR, write a comment, give us a like, or simply tell your friends about abap2UI5. This project thrives with your support! 🚀_ +_We welcome all contributions! Share your knowledge, hunt for bugs, submit a PR, write a comment, give us a like, or simply tell your friends about abap2UI5. This project thrives on your support! 🚀_ diff --git a/app/webapp/controller/App.controller.js b/app/webapp/controller/App.controller.js index d9956afb..957f7508 100644 --- a/app/webapp/controller/App.controller.js +++ b/app/webapp/controller/App.controller.js @@ -523,7 +523,7 @@ sap.ui.define("z2ui5/FileUploader", ["sap/ui/core/Control", "sap/m/Button", "sap style: oControl.getProperty("style"), fileType: oControl.getProperty("fileType"), visible: oControl.getProperty("visible"), - uploadOnChange: true, + uploadOnChange: oControl.getProperty("checkDirectUpload"), enabled: oControl.getProperty("enabled"), value: oControl.getProperty("path"), placeholder: oControl.getProperty("placeholder"), diff --git a/src/01/03/z2ui5_cl_app_app_js.clas.abap b/src/01/03/z2ui5_cl_app_app_js.clas.abap index e45f0f9c..f41931e2 100644 --- a/src/01/03/z2ui5_cl_app_app_js.clas.abap +++ b/src/01/03/z2ui5_cl_app_app_js.clas.abap @@ -545,7 +545,7 @@ CLASS z2ui5_cl_app_app_js IMPLEMENTATION. ` style: oControl.getProperty("style"),` && |\n| && ` fileType: oControl.getProperty("fileType"),` && |\n| && ` visible: oControl.getProperty("visible"),` && |\n| && - ` uploadOnChange: true,` && |\n| && + ` uploadOnChange: oControl.getProperty("checkDirectUpload"),` && |\n| && ` enabled: oControl.getProperty("enabled"),` && |\n| && ` value: oControl.getProperty("path"),` && |\n| && ` placeholder: oControl.getProperty("placeholder"),` && |\n| &&