mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 06:46:00 +00:00
fix: Correctly upload manual to resources path
Use the right filesystem handler for the manual to be uploaded to the `resources` path instead of the `rom` path.
This commit is contained in:
@@ -814,10 +814,10 @@ async def add_rom_manuals(
|
||||
raise RomNotFoundInDatabaseException(id)
|
||||
|
||||
manuals_path = f"{rom.fs_resources_path}/manual"
|
||||
file_location = fs_rom_handler.validate_path(f"{manuals_path}/{rom.id}.pdf")
|
||||
file_location = fs_resource_handler.validate_path(f"{manuals_path}/{rom.id}.pdf")
|
||||
log.info(f"Uploading manual to {hl(str(file_location))}")
|
||||
|
||||
await fs_rom_handler.make_directory(manuals_path)
|
||||
await fs_resource_handler.make_directory(manuals_path)
|
||||
|
||||
parser = StreamingFormDataParser(headers=request.headers)
|
||||
parser.register("x-upload-platform", NullTarget())
|
||||
|
||||
Reference in New Issue
Block a user