Of the whole web_sys::File object, only the name seems in use. If instead of files, ybc::FileProperties contained a file_names: Vec<String>, ownership wouldn't be an issue anymore.
Thus I offer to add a file_names property to ybc::FileProperties. files would stay for compatibility. Its content would appended to the list, after elements from file_names.
Does that sound reasonable? If yes, I'll be happy to send you a pull request.
Currently the
files
property ofybc::FileProperties
is aVec<web_sys::File>
. This is slightly inconvenient, because in order to read the file, one need to hand it over eg to aReaderService
, at which pointybc::FileProperties
can no longer own it.Of the whole
web_sys::File
object, only the name seems in use. If instead offiles
,ybc::FileProperties
contained afile_names: Vec<String>
, ownership wouldn't be an issue anymore.Thus I offer to add a
file_names
property toybc::FileProperties
.files
would stay for compatibility. Its content would appended to the list, after elements fromfile_names
. Does that sound reasonable? If yes, I'll be happy to send you a pull request.