Expand skin upload schema and simplify texture storage
Updated the skin upload schema to accept both JSON and multipart/form-data content types, and to allow requests without a URL. Simplified the texture storage path in userService.js by removing subdirectory partitioning based on hash.
This commit is contained in:
@@ -492,8 +492,7 @@ async function uploadSkin(uuid, fileObject, variant) {
|
||||
const existingTexture = await userRepository.getTextureByHash(hash)
|
||||
|
||||
if (!existingTexture) {
|
||||
const subDir = hash.substring(0, 2)
|
||||
const targetDir = path.join(TEXTURES_DIR, subDir)
|
||||
const targetDir = path.join(TEXTURES_DIR)
|
||||
const targetPath = path.join(targetDir, hash)
|
||||
|
||||
await fs.mkdir(targetDir, { recursive: true })
|
||||
|
||||
Reference in New Issue
Block a user