daveappserver 0.6.16 → 0.6.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/appserver.js +19 -3
- package/package.json +1 -1
package/appserver.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var myVersion = "0.6.
|
|
1
|
+
var myVersion = "0.6.17", myProductName = "daveAppServer";
|
|
2
2
|
|
|
3
3
|
exports.start = startup;
|
|
4
4
|
exports.notifySocketSubscribers = notifySocketSubscribers;
|
|
@@ -238,7 +238,7 @@ function cleanFileStats (stats) { //4/19/21 by DW
|
|
|
238
238
|
}
|
|
239
239
|
var cleanStats = {
|
|
240
240
|
size: stats.size, //number of bytes in file
|
|
241
|
-
whenAccessed: formatDate (stats.atime), //when last
|
|
241
|
+
whenAccessed: formatDate (stats.atime), //when last read
|
|
242
242
|
whenCreated: formatDate (stats.birthtime),
|
|
243
243
|
whenModified: formatDate (stats.mtime),
|
|
244
244
|
flPrivate: stats.flPrivate
|
|
@@ -414,7 +414,23 @@ function cleanFileStats (stats) { //4/19/21 by DW
|
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
function getFileFromS3 (screenname, relpath, flprivate, callback) {
|
|
417
|
-
|
|
417
|
+
function formatDate (d) {
|
|
418
|
+
return (new Date (d).toUTCString ());
|
|
419
|
+
}
|
|
420
|
+
s3.getObject (getS3FilePath (screenname, relpath, flprivate), function (err, data) {
|
|
421
|
+
if (err) {
|
|
422
|
+
callback (err);
|
|
423
|
+
}
|
|
424
|
+
else {
|
|
425
|
+
var data = {
|
|
426
|
+
filedata: data.Body.toString (),
|
|
427
|
+
filestats: {
|
|
428
|
+
whenModified: formatDate (data.LastModified)
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
callback (undefined, data);
|
|
432
|
+
}
|
|
433
|
+
});
|
|
418
434
|
}
|
|
419
435
|
function saveFileToS3 (screenname, relpath, type, flprivate, filetext, callback) {
|
|
420
436
|
const acl = undefined; //use the default
|