mirror of
https://github.com/hanzoai/sign.git
synced 2026-10-21 01:21:51 +00:00
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:
@@ -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,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';
|
||||
|
||||
Reference in New Issue
Block a user