Fix admin product image handling and clarify support phone settings.
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
const MAX_EDGE = 960
|
||||
const JPEG_QUALITY = 0.82
|
||||
|
||||
export function toCssBackgroundUrl(url: string): string {
|
||||
const trimmed = url.trim()
|
||||
if (!trimmed) return ''
|
||||
return `url("${trimmed.replace(/"/g, '\\"')}")`
|
||||
}
|
||||
|
||||
export async function fileToCatalogImage(file: File): Promise<string> {
|
||||
if (!file.type.startsWith('image/')) {
|
||||
throw new Error('فقط فایل تصویری مجاز است.')
|
||||
|
||||
Reference in New Issue
Block a user