-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileBox toJSON issue #211
Comments
That's by design and is expected behavior. By our current design, all Base64 / Stream type FileBox must be converted to UUID type before passing it through Puppet Service. The 20K size limitation is for testing purposes. |
I didn't get it. |
that’s correct. The latest version should work as expected after the FileBox code fix. Please feel free to let me know if there has any issues with the FileBox related code. |
I see you have fixed Base 64 fileboxes in the latest version, however Buffer fileboxes less than 20K are still unhandled and will result in error.
|
Could you please add a unit test to fail the CI so that we can fix it? Thank you very much! |
So far this messageFile grpc call will work, but it will fall back to messageFileStream when dealing with buffer under 20K size. I don't think this is the expected behavior. |
https://github.com/huan/file-box/blob/d40ead1a6f6bd3ff0a2de0fe44ad399784d6a229/src/file-box.ts#L683-773
From above code, we can see that only uuid, url and qrcode fileboxes can call toJson method. However here:
puppet-service/src/file-box-helper/normalize-filebox.ts
Lines 30 to 80 in 5805a31
We can see that buffer and base64 fileboxes which are less than 20K size will pass. And this will result in error:
The text was updated successfully, but these errors were encountered: