How to Upload a vtk binary file ?

SophieCollin
SophieCollin Member, Employee Posts: 1
Solution Developer Community of Practice Member

Hi all,

I would like to use a component like dcc.Upload() to be able to upload vtk files (ascii and binary). However, this component only manages csv or excel files. I tried to use base64.b64decode but it doesn't work :/

Does somebody knows which component to use in case of binary file ? or How to decode the ' contents' from dcc.Upload ?

Here is the code I tried:

Thanks for your help

Answers

  • Vinodkumar13
    Vinodkumar13 Member, Employee Posts: 19
    First Comment First Anniversary Ansys Employee Name Dropper

    Hi,

    The dcc.Upload can manage large number of file types. It has "accept" property which allows to define the uploaded extension file type.

    accept='.txt',