Protobuf.js: Can the function "load" pass a File as a param

Created on 10 Aug 2017  路  3Comments  路  Source: protobufjs/protobuf.js

protobuf.js version:

<please provide a code snippet for reproduction>
<please paste the stack trace of the error if applicable>

Most helpful comment

If you are looking for a way to load a proto string, take a look at protobuf.parse. It returns a Root instance from a proto string.

All 3 comments

If you are looking for a way to load a proto string, take a look at protobuf.parse. It returns a Root instance from a proto string.

Thx.
I want to load a protobuf File object. For example, I received a file from uploading, and I want to verify this proto file.
Now I can only to load file at protobuf.load( file.path )锛宼his is ok. But will it be better to load file with the File Object ?

I think my issue is not important. So I close it.

Was this page helpful?
0 / 5 - 0 ratings