Updated all dependencies. Updated MindGeek to Aylo.

This commit is contained in:
DebaucheryLibrarian
2023-11-30 03:12:47 +01:00
parent 90aa29d2d4
commit 98bf7ea9dd
83 changed files with 9071 additions and 23082 deletions

View File

@@ -330,6 +330,8 @@ async function request(method = 'get', url, body, requestOptions = {}, limiter)
return bypassCloudflareRequest(url, method, body, withCloudflareBypass, options);
}
console.log(url, options);
const res = await (body
? http[method](url, body, options)
: http[method](url, options));

View File

@@ -1,17 +1,17 @@
'use strict';
const config = require('config');
const AWS = require('aws-sdk');
const fs = require('fs');
const { nanoid } = require('nanoid');
const { Upload } = require('@aws-sdk/lib-storage');
const { S3Client } = require('@aws-sdk/client-s3');
async function init() {
const filepath = './public/img/sfw/animals/j0iiByCxGfA.jpeg';
const endpoint = new AWS.Endpoint('s3.wasabisys.com');
const s3 = new AWS.S3({
// region: 'eu-central-1',
endpoint,
const s3 = new S3Client({
region: 'eu-central-1',
endpoint: 's3.eu-central-1.wasabisys.com',
credentials: {
accessKeyId: config.s3.accessKey,
secretAccessKey: config.s3.secretKey,
@@ -19,18 +19,21 @@ async function init() {
});
try {
const data = await s3.listBuckets().promise();
// const data = await s3.listBuckets().promise();
const file = fs.createReadStream(filepath);
const key = `img/${nanoid()}.jpg`;
const status = await s3.upload({
Bucket: config.s3.bucket,
Body: file,
Key: key,
ContentType: 'image/jpeg',
}).promise();
const status = await new Upload({
client: s3,
params: {
Bucket: config.s3.bucket,
Body: file,
Key: key,
ContentType: 'image/jpeg',
},
}).done();
console.log(data);
// console.log(data);
console.log(status);
} catch (error) {
console.log(error);