mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
Move Transformation and Upload classes to shared location
This commit is contained in:
parent
4a2f0a5a46
commit
0b014761ec
@ -1,22 +1,21 @@
|
|||||||
import { Server } from "linebridge"
|
import { Server } from "linebridge"
|
||||||
|
|
||||||
import B2 from "backblaze-b2"
|
|
||||||
|
|
||||||
import DbManager from "@shared-classes/DbManager"
|
import DbManager from "@shared-classes/DbManager"
|
||||||
import RedisClient from "@shared-classes/RedisClient"
|
import RedisClient from "@shared-classes/RedisClient"
|
||||||
import StorageClient from "@shared-classes/StorageClient"
|
import StorageClient from "@shared-classes/StorageClient"
|
||||||
import CacheService from "@shared-classes/CacheService"
|
import CacheService from "@shared-classes/CacheService"
|
||||||
import SSEManager from "@shared-classes/SSEManager"
|
import SSEManager from "@shared-classes/SSEManager"
|
||||||
import SharedMiddlewares from "@shared-middlewares"
|
|
||||||
import LimitsClass from "@shared-classes/Limits"
|
import LimitsClass from "@shared-classes/Limits"
|
||||||
import TaskQueueManager from "@shared-classes/TaskQueueManager"
|
import TaskQueueManager from "@shared-classes/TaskQueueManager"
|
||||||
|
|
||||||
|
import SharedMiddlewares from "@shared-middlewares"
|
||||||
|
|
||||||
class API extends Server {
|
class API extends Server {
|
||||||
static refName = "files"
|
static refName = "files"
|
||||||
static useEngine = "hyper-express-ng"
|
static useEngine = "hyper-express-ng"
|
||||||
static routesPath = `${__dirname}/routes`
|
static routesPath = `${__dirname}/routes`
|
||||||
static listen_port = process.env.HTTP_LISTEN_PORT ?? 3002
|
static listen_port = process.env.HTTP_LISTEN_PORT ?? 3002
|
||||||
static enableWebsockets = true
|
//static enableWebsockets = true
|
||||||
|
|
||||||
middlewares = {
|
middlewares = {
|
||||||
...SharedMiddlewares,
|
...SharedMiddlewares,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import path from "node:path"
|
import path from "node:path"
|
||||||
import fs from "node:fs"
|
import fs from "node:fs"
|
||||||
|
|
||||||
import Upload from "@classes/Upload"
|
import Upload from "@shared-classes/Upload"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
id: "file-process",
|
id: "file-process",
|
||||||
|
@ -2,7 +2,7 @@ import path from "node:path"
|
|||||||
import fs from "node:fs"
|
import fs from "node:fs"
|
||||||
|
|
||||||
import { checkChunkUploadHeaders, handleChunkFile } from "@classes/ChunkFile"
|
import { checkChunkUploadHeaders, handleChunkFile } from "@classes/ChunkFile"
|
||||||
import Upload from "@classes/Upload"
|
import Upload from "@shared-classes/Upload"
|
||||||
import bufferToStream from "@shared-utils/bufferToStream"
|
import bufferToStream from "@shared-utils/bufferToStream"
|
||||||
|
|
||||||
const availableProviders = ["b2", "standard"]
|
const availableProviders = ["b2", "standard"]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import path from "node:path"
|
import path from "node:path"
|
||||||
import fs from "node:fs"
|
import fs from "node:fs"
|
||||||
|
|
||||||
import Upload from "@classes/Upload"
|
import Upload from "@shared-classes/Upload"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
useContext: ["cache"],
|
useContext: ["cache"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user