Closed florianbepunkt closed 4 years ago
Yes this is related to the docs, although this is specified here and here: returns output 'data' of the form:
. Maybe we can add whatever the input data (uri or buffer)
?
Anyway returning buffer should also be possible as detailed in https://github.com/feathersjs-ecosystem/feathers-blob/issues/69. Always welcome a PR on this !
I agree with your proposal as stated in #69, leaving status quo as default for backwards compatibility.
My use case is that I get files and pass them as buffer to another service. Currently the file gets fetched as a stream, converted to a buffer, converted to a string in order so that I convert it back to a buffer. This adds unnecessary overhead.
Will throw together a PR.
Steps to reproduce
A
Service.get()
operation does not return data the same format as in create (as stated in the Readme):Service.create()
accepts an object with either an uri or a Buffer, but get only returns an uri.Expected behavior
Buffer object should be provided or docs clarified.
I can put together a PR. Please let me know if this is an issue with the docs or the get implementation (or intended).