Bucket is name of your bucket and key is name of subfolder. So, if your bucket name is “test-bucket” and you want to save file in “
test-bucket/folder/subfolder/file.csv
”, then value of Key should be “folder/subfolder/file.csv
”.
test-bucket/folder/subfolder/file.csv
”, then value of Key should be “folder/subfolder/file.csv
”.
RouterModule
to imports
of every @NgModule()
where components use any component or directive from (in this case routerLink
and <router-outlet>
.declarations: []
is to make components, directives, pipes, known inside the current module.exports: []
is to make components, directives, pipes, available to importing modules. What is added to declarations
only is private to the module. exports
makes them public..class1.class2 {
/* style here */
}
class1
that also have class2
.li.left.ui-class-selector {
}
<div class="dropdown-menu dropdown-menu-right">
STUFF
</div>
<div class="dropdown-menu pull-right">
STUFF
</div>
app.get('/download', function(req, res){
const file = `${__dirname}/upload-folder/dramaticpenguin.MOV`;
res.download(file); // Set disposition and send it.
});
res.setHeader('Content-disposition', 'attachment; filename=dramaticpenguin.MOV');
res.setHeader('Content-type', 'video/quicktime');
var path = require('path');
var mime = require('mime');
var fs = require('fs');
app.get('/download', function(req, res){
var file = __dirname + '/upload-folder/dramaticpenguin.MOV';
var filename = path.basename(file);
var mimetype = mime.lookup(file);
res.setHeader('Content-disposition', 'attachment; filename=' + filename);
res.setHeader('Content-type', mimetype);
var filestream = fs.createReadStream(file);
filestream.pipe(res);
});
'use strict'; | |
var mysqlBackup = require('./mysql-backup'); | |
var schedule = require('node-schedule'); | |
schedule.scheduleJob({ hour: 22, minute: 0 }, mysqlBackup); |
'use strict'; | |
var spawn = require('child_process').spawn; | |
var s3Upload = require('s3-stream-upload'); | |
var config = require('../config'); | |
var Promise = require('bluebird'); | |
var moment = require('moment'); | |
var mysqlBackup = function() { | |
var upload = s3Upload({ | |
accessKeyId: config.aws.accessKey, | |
secretAccessKey: config.aws.secretKey, | |
Bucket: config.aws.buckets.backup.name, | |
region: config.aws.buckets.backup.region | |
}); | |
var s3 = upload({ Key: 'mysql-backup-' + moment().format('YYYY-MM-DD-HH-mm-ss') + '.sql' }); | |
var mysqldump = spawn('mysqldump', [ | |
'-u', config.db.connection.user, | |
'-p' + config.db.connection.password, | |
config.db.connection.database | |
]); | |
return new Promise(function(resolve, reject) { | |
mysqldump | |
.stdout | |
.pipe(s3) | |
.on('finish', function() { | |
resolve(); | |
}) | |
.on('error', function(err) { | |
reject(err); | |
}); | |
}); | |
}; | |
module.exports = mysqlBackup; |
https://stackoverflow.com/questions/77744344/is-it-okay-to-use-both-fetchpriority-high-and-loading-eager-in-img-tag Yes Fetchpriority and l...