Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hi,
I am using the File upload widget to upload the files into system repository.
How to validate the chosen file name is already available into repository before click on upload button?.
Could you please give the steps how to validate?.
Currently what is happening is its overriding existing file if file name is same.
Thank you in advance....
Regards,
Latha
Solved! Go to Solution.
Unfortunately your picture is not visible in the last post.
The idea is, that the file upload button is disabled and not visible, but instead you can use the upload action.
You can trigger the upload action by a button click or any other thingworx event on the UI.
You can return a list of file names from the Repository you're using through GetFileListing service in FileRepository Template. You can compare the file name with new file through some script or you can just post the list and let the user compare by themselves.
A while ago, I had a similar problem of doing some validation. The post from zyuan1 is good.
As I wanted to automate it, I changed the standard widget, by deactivating the "upload" button and enable the widget to trigger upload by a service.
If you want I can provide you the widget, just send me a short message here.
DISCLAIMER: This mashup is not supported by PTC and not maintained during new releases. It was developed in 8.1 and is still working in 8.4, but that might change in future versions.
Thank you for information.
Could you please provide the widget?.
Regards,
Latha
I have seen, that I could also upload it here.
Please feel free to use it or modify it as needed.
Thanks for providing the custom widget. I have downloaded.
Hi,
I have added new File Upload widget.By default, upload button is disabled.
How to enable the upload button?. What data type accepts the Upload binding property?.
Thanks&Regards,
Latha
Unfortunately your picture is not visible in the last post.
The idea is, that the file upload button is disabled and not visible, but instead you can use the upload action.
You can trigger the upload action by a button click or any other thingworx event on the UI.
Hi,
Thank you for quick response.
I am able to bind upload service using click event.
Regards,
Latha