cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

File Upload validation

SOLVED
vi1
Amethyst

File Upload validation

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....

 

File Uplaod.png  

Regards,

Latha

1 ACCEPTED SOLUTION

Accepted Solutions

Re: File Upload validation

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.

8 REPLIES 8

Re: File Upload validation

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.

Re: File Upload validation

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.

 2019-05-13_11-16-00.png              2019-05-13_11-16-14.png

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.

Re: File Upload validation

Thank you for information.

 

Could you please provide the widget?.

 

Regards,

Latha

Highlighted

Re: File Upload validation

I have seen, that I could also upload it here.

Please feel free to use it or modify it as needed.

Re: File Upload validation

 

 

Thanks for providing the custom widget. I have downloaded.

Re: File Upload validation

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

Re: File Upload validation

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.

Re: File Upload validation

Hi,

 

Thank you for quick response.

I am able to bind upload service using click event.

 

Regards,

Latha