janhq/jan

[Feature Request] Allow larger image sizes to be uploaded

Opened this issue · 0 comments

const maxSize = 10 * 1024 * 1024 // 10MB in bytes
const newFiles: Attachment[] = []
const duplicates: string[] = []
const existingImageNames = new Set(
attachments.filter((a) => a.type === 'image').map((a) => a.name)
)
Array.from(files).forEach((file) => {
// Check for duplicate image names
if (existingImageNames.has(file.name)) {
duplicates.push(file.name)
return
}
// Check file size
if (file.size > maxSize) {
setMessage(`File is too large. Maximum size is 10MB.`)
// Reset file input to allow re-uploading
if (fileInputRef.current) {
fileInputRef.current.value = ''
}
return
}

There is currently a hard file size limit on uploaded images. This means I cant upload a file that 11MBs.
I'm curious to know if this was a required limitation or no longer applicable.
I can see some user running models locally that could easily handle a 20MB image.