fix(files): import content-disposition 3's create by name

content-disposition went from 1 to 3, which is ESM with named exports only:
create, format, parse. The file routes still took its default export, which
3 does not have, and an ESM import of a missing default fails when the
module links, so the routes that serve documents could not load.

They import create under the name they already call. It is 1's function
under a new name — attachment by default, an ASCII fallback beside the
UTF-8 filename* — except that 3 leaves a name that is a valid token
unquoted: `filename=Contract.pdf` where 1 wrote `filename="Contract.pdf"`.
Both are RFC 6266.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-09-19 04:32:33 -07:00
co-authored by Hanzo Dev
parent d15022d194
commit 024a886eef
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
import { type DocumentDataType, DocumentStatus } from '@prisma/client';
import contentDisposition from 'content-disposition';
import { create as contentDisposition } from 'content-disposition';
import { type Context } from 'hono';
import { sha256 } from '@hanzo/esign-lib/universal/crypto';
+1 -1
View File
@@ -1,6 +1,6 @@
import { sValidator } from '@hono/standard-validator';
import type { Prisma } from '@prisma/client';
import contentDisposition from 'content-disposition';
import { create as contentDisposition } from 'content-disposition';
import { Hono } from 'hono';
import { getOptionalSession } from '@hanzo/esign-auth/server/lib/utils/get-session';