mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
Use less memory to build translation files (#6070)
* Change languages build to use less memory Add graceful-fs so no ned to worry about fs limits * Specify encoding for fs.readFile Use eachLimit since graceful-fs handles that now
This commit is contained in:
committed by
Barış Soner Uşaklı
parent
f5385e38bf
commit
c47c47f7e3
@@ -120,9 +120,7 @@ image.size = function (path, callback) {
|
||||
};
|
||||
|
||||
image.convertImageToBase64 = function (path, callback) {
|
||||
fs.readFile(path, function (err, data) {
|
||||
callback(err, data ? data.toString('base64') : null);
|
||||
});
|
||||
fs.readFile(path, 'base64', callback);
|
||||
};
|
||||
|
||||
image.mimeFromBase64 = function (imageData) {
|
||||
|
||||
Reference in New Issue
Block a user