Update TUS backend
All checks were successful
Publish Development Docker Image / Publish Development Docker Image (push) Successful in 1m34s
All checks were successful
Publish Development Docker Image / Publish Development Docker Image (push) Successful in 1m34s
This commit is contained in:
@ -28,13 +28,9 @@ const PDF = ({ url, form = false }: PDFProps) => {
|
||||
width: 'calc(100vw - 1rem)',
|
||||
height: `calc(100vh - ${form ? '8.5rem' : '6rem'})`,
|
||||
}}
|
||||
allowFullScreen
|
||||
className="rounded-xl"
|
||||
onError={() => setError(true)}
|
||||
onLoad={() => setError(false)}
|
||||
sandbox="allow-same-origin allow-scripts allow-forms allow-popups"
|
||||
referrerPolicy="no-referrer-when-downgrade"
|
||||
loading="lazy"
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ const Uploader = ({
|
||||
onBeforeUpload: (files) => {
|
||||
for (const [key, file] of Object.entries(files)) {
|
||||
instance.setFileMeta(key, {
|
||||
name: new Date().getTime().toString(),
|
||||
name: `${new Date().getTime().toString()}.${file.extension}`,
|
||||
type: file.type,
|
||||
contentType: file.type,
|
||||
})
|
||||
@ -68,7 +68,7 @@ const Uploader = ({
|
||||
removeFingerprintOnSuccess: true,
|
||||
})
|
||||
.use(Compressor, {
|
||||
mimeType: 'image/webp',
|
||||
mimeType: type === 'image' ? 'image/webp' : 'application/pdf',
|
||||
})
|
||||
|
||||
if (type === 'image')
|
||||
|
Reference in New Issue
Block a user