Compare commits

..

No commits in common. "bd150ad9e808dac2c54df25be6eeb38b70fbb22b" and "f9c6056b74346836587e5df7ae12bafadde93957" have entirely different histories.

4 changed files with 30 additions and 25 deletions

12
flake.lock generated
View file

@ -1105,11 +1105,11 @@
},
"nixpkgs_11": {
"locked": {
"lastModified": 1739923778,
"narHash": "sha256-BqUY8tz0AQ4to2Z4+uaKczh81zsGZSYxjgvtw+fvIfM=",
"lastModified": 1736916166,
"narHash": "sha256-puPDoVKxkuNmYIGMpMQiK8bEjaACcCksolsG36gdaNQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "36864ed72f234b9540da4cf7a0c49e351d30d3f1",
"rev": "e24b4c09e963677b1beea49d411cd315a024ad3a",
"type": "github"
},
"original": {
@ -1676,11 +1676,11 @@
"rust-overlay": "rust-overlay_4"
},
"locked": {
"lastModified": 1740496613,
"narHash": "sha256-dIc02V+62Q9SftBEzsghruUSzAx/0ZWJA3eAe41KNec=",
"lastModified": 1740088478,
"narHash": "sha256-olqbNvJ5Uk1LseAC1zYDSL0BPLhPxkQG8EhO/3zhKRw=",
"owner": "natsukagami",
"repo": "youmubot",
"rev": "f995852a1297cbbded3e2fb31d532ffb885382df",
"rev": "a35563801dbf74c6f221aac3e70146572e3fe14e",
"type": "github"
},
"original": {

View file

@ -5,10 +5,10 @@ let
osu-pkg = with pkgs; with lib;
appimageTools.wrapType2 rec {
pname = "osu-lazer-bin";
version = "2025.225.0";
version = "2025.221.0";
src = fetchurl {
url = "https://github.com/ppy/osu/releases/download/${version}/osu.AppImage";
hash = "sha256-detSX0/akBJE2bdTxUvUUlBMKswHPF1qg9tsWZ00zso=";
hash = "sha256-V6JJShVGE4GXGI8FvDhyWuHUnlI+p3JLW/NN+u+Vikc=";
};
extraPkgs = pkgs: with pkgs; [ icu ];

View file

@ -1,5 +1,11 @@
commit 8c7f8c28fabc174a71499a4737579b24b5c4b244
Author: Natsu Kagami <nki@nkagami.me>
Date: Mon Oct 21 02:17:36 2024 +0200
Support R2
diff --git a/.env.sample b/.env.sample
index 51046501d..6daf60347 100644
index eb57ad85c..94ffcee07 100644
--- a/.env.sample
+++ b/.env.sample
@@ -66,6 +66,8 @@ AWS_S3_UPLOAD_BUCKET_URL=http://s3:4569
@ -12,10 +18,10 @@ index 51046501d..6daf60347 100644
# AUTHENTICATION
diff --git a/app/utils/files.ts b/app/utils/files.ts
index 16b66a2c4..c56ffd2b2 100644
index 6607a6b12..5138f68ad 100644
--- a/app/utils/files.ts
+++ b/app/utils/files.ts
@@ -88,8 +88,13 @@ export const uploadFile = async (
@@ -63,8 +63,13 @@ export const uploadFile = async (
xhr.addEventListener("loadend", () => {
resolve(xhr.readyState === 4 && xhr.status >= 200 && xhr.status < 400);
});
@ -51,20 +57,20 @@ index 5b420f2e1..4ea1e8d3c 100644
* Whether to force path style URLs for S3 objects, this is required for some
* S3-compatible storage providers.
diff --git a/server/routes/api/attachments/attachments.ts b/server/routes/api/attachments/attachments.ts
index d2288c215..72251962c 100644
index 5e6c27594..b7620f440 100644
--- a/server/routes/api/attachments/attachments.ts
+++ b/server/routes/api/attachments/attachments.ts
@@ -3,6 +3,7 @@ import { v4 as uuidv4 } from "uuid";
import { AttachmentPreset } from "@shared/types";
import { bytesToHumanReadable, getFileNameFromUrl } from "@shared/utils/files";
import { bytesToHumanReadable } from "@shared/utils/files";
import { AttachmentValidation } from "@shared/validations";
+import env from "@server/env";
import { createContext } from "@server/context";
import {
AuthorizationError,
@@ -83,16 +84,30 @@ router.post(
userId: user.id,
});
import { AuthorizationError, ValidationError } from "@server/errors";
import auth from "@server/middlewares/authentication";
import { rateLimiter } from "@server/middlewares/rateLimiter";
@@ -90,16 +91,30 @@ router.post(
{ transaction }
);
- const presignedPost = await FileStorage.getPresignedPost(
- key,
@ -101,7 +107,7 @@ index d2288c215..72251962c 100644
"Cache-Control": "max-age=31557600",
"Content-Type": contentType,
diff --git a/server/storage/files/BaseStorage.ts b/server/storage/files/BaseStorage.ts
index 339262cc5..03f658271 100644
index ce0287ebc..a1931c83d 100644
--- a/server/storage/files/BaseStorage.ts
+++ b/server/storage/files/BaseStorage.ts
@@ -26,6 +26,8 @@ export default abstract class BaseStorage {
@ -129,7 +135,7 @@ index 83cf98c50..324e60dd9 100644
return "/api/files.create";
}
diff --git a/server/storage/files/S3Storage.ts b/server/storage/files/S3Storage.ts
index beba39ab2..4f0fe09a9 100644
index a42442e0c..d55ef5472 100644
--- a/server/storage/files/S3Storage.ts
+++ b/server/storage/files/S3Storage.ts
@@ -4,6 +4,7 @@ import {
@ -175,4 +181,3 @@ index beba39ab2..4f0fe09a9 100644
const isDocker = env.AWS_S3_UPLOAD_BUCKET_URL.match(/http:\/\/s3:/);
const params = {
Bucket: this.getBucket(),

View file

@ -22,7 +22,7 @@ let
overlay-versioning = final: prev: {
gotosocial = prev.gotosocial.overrideAttrs (attrs: rec {
version = "0.18.1";
version = "0.18.0-rc3";
ldflags = [
"-s"
"-w"
@ -32,13 +32,13 @@ let
web-assets = final.fetchurl {
url = "https://github.com/superseriousbusiness/gotosocial/releases/download/v${version}/gotosocial_${version}_web-assets.tar.gz";
hash = "sha256-5MSABLPyTbFMTno9vUDvLT9h7oQM6eNUuwD+dsHiCLo=";
hash = "sha256-qbhUsH9F7xteRVg9c9y/iVrtir1vhCOL3v6CsDsMblg=";
};
src = final.fetchFromGitHub {
owner = "superseriousbusiness";
repo = "gotosocial";
rev = "v${version}";
hash = "sha256-4jV1G1HwpIST2Y27RAhJB3CoJevwuhxdzi615hj0Qv0=";
hash = "sha256-BYGkuLYwJtV2FSfr0MQKMpwCddTWMfbYUXqP7SZCv1A=";
};
postInstall = ''
tar xf ${web-assets}