Hello all,
an import requirement for our server implementation shall be to download a file from the client to the server.
Is the assumption right to realize this requirement with the specified UA Programs (UA Spec. Part 10)?
How is it possible to tell the Client, that a file should be used from it's hard disk?
Something like the well-known dialog to refernce the file from the HDD.
Is there some sample server available, which use UA Programs or even a file up- or download?
Regards,
Martin
![Avatar](https://opcfoundation.org/wp-content/uploads/sp-resources/forum-avatars/defaults/guestdefault.png)
Hello Martin,
The file object, available with version 1.03 of UA Part 5, may be the proper solution for your download requirement. It defines a UA ObjectType with Methods using the well-known file pattern as template.
Unfortunately, I am not aware of any samples for file download.
From your write-up I understand that the initiative starts with the Server, asking the Client to pick a file from HDD and transfer it to the Server. If I understood it right you would want to define a new event ("FileDownloadRequestEvent") with two properties "file name" (the name of the file that the Server needs) and "file object" (the NodeId of the File Object in the Server that the Client shall use for the download).
When the Client receives this event it will open the file on HDD, then call the "Open" method on the Server's file object and then perform the download.
Hope this is useful to some extent.
-Karl
Hello Karl,
thanks for your detailed answer. This is exalty the UA Spec. part what we are looking for in relation to a file download!
My description to tell a client to do this action is unfortunately wrong.
Our current considerations are to pick-up a file f.e. in the clients GUI and start the download from the client-side, too.
In this case the file could be represent as an Object from ObjectType FileType with the approprioated methods. The file download could be done by the method-sequence open-(set position)-write-close, is this right? Or is there a smarter way specified?
Regards
Martin
1 Guest(s)