We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
$ npm start > [email protected] start /**/rest-fs > node index.js $ wget http://localhost:3000/usr/share/icons/hicolor/16x16/apps/Thunar.png -O /tmp/Thunar.png $ f=/usr/share/icons/hicolor/16x16/apps/Thunar.png; node -e "console.log(require('fs').readFileSync('$f'))" <Buffer 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 10 00 00 00 10 08 03 00 00 00 28 2d 0f 53 00 00 00 04 67 41 4d 41 00 00 b1 8f 0b fc 61 05 00 ... > $ f=/tmp/Thunar.png; node -e "console.log(require('fs').readFileSync('$f'))" <Buffer ef bf bd 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 10 00 00 00 10 08 03 00 00 00 28 2d 0f 53 00 00 00 04 67 41 4d 41 00 00 ef bf bd ef bf ... >
Image files provided by rest-fs become unreadable. The same may happen with all other binary types.
rest-fs
The text was updated successfully, but these errors were encountered:
On the file fileserver.js, replace:
fileserver.js
fileDriver.readFile(filePath, encoding, function(err, data) {
by:
fileDriver.readFile(filePath, null, function(err, data) {
... then the file transmission works.
Well, the problem comes from the default encoding:
var encoding = req.query.encoding || 'utf8';
Is this really necessary?
Sorry, something went wrong.
No branches or pull requests
Image files provided by
rest-fs
become unreadable. The same may happen with all other binary types.The text was updated successfully, but these errors were encountered: