The issues in post #11, where the ViewFileItem was failing to show either previews or icons (depending on showFileInline) should all be resolved and working in all branches (13.1 and above). We apologize for not following up after post #25
Are you still seeing the problems referenced in post #11 in your environment?
RE your other question - the cleared out "image" attribute should be fine. This is mentioned in the "Uploading Files" overview document here:
https://smartclient.com/smartclient-...=group..upload
Note that FileItems cannot be programmatically populated - this is a browser security restriction over which we have no control. This restriction means that we are unable to populate a FileItem with the correct filename when a form is editing an existing record. Also, when you call saveData() on a form that is editing a new record, the FileItem will be cleared on successful completion of the saveData() call; this is a side-effect of the form being placed into "edit" mode. In both of these cases, the fact that the FileItem has been cleared will not cause the persisted binary data to be removed by SmartClient Server on subsequent calls to setData(). If the user selects another file, it will overwrite the existing one; if the FileItem is left blank, the server simply ignores it. If you actually wish to wipe out the value of a binary field, call updateData() on the underlying dataSource, passing an explicit null value for the binary field.
Regards
Isomorphic Software
Leave a comment: