Kitware / trame

Trame lets you weave various components and technologies into a Web Application solely written in Python.
https://kitware.github.io/trame/
Other
426 stars 56 forks source link

Documentation of file_upload #479

Closed guy-977 closed 7 months ago

guy-977 commented 7 months ago

Is your feature request related to a problem? Please describe.

I've struggled to find information about the ClientFile class in trame.app.file_upload, and I needed to figure it out in my own by reading its source code.

Describe the solution you'd like

Create a comprehensive documentation about the class and its methods, with use cases examples.

Describe alternatives you've considered

I don't think that there's an alternative to documentation.

Additional context

the docs link: https://trame.readthedocs.io/en/latest/trame.app.file_upload.html the source code in github: https://github.com/Kitware/trame/blob/master/trame/app/file_upload.py

jourdain commented 7 months ago

Thanks for bringing that to our attention. I'm not sure why the basic docstring were not showing in RTD. But now it is fixed.

chiyandetaotie commented 5 months ago

I want to know how to use the ClientFile class in trame.app.file_uploaad to upload the file and render it on the browser. image How to use the vtkXMLUnstructuredGridReader() to read the file uploaded from browser?

jourdain commented 5 months ago

You can use SetBinaryInputString (const char *, int len) or simply write the file on the server and read it from the path you created.