Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ImageWildcard Any image format including JPEG, PNG, GIF, SVG, WebP, and other supported image types. // Allows users to select any image file from their device. ImageWildcard = Accept("image/*") // VideoWildcard Any video format including MP4, WebM, AVI, MOV, and other supported video types. // Enables video file uploads across different formats. VideoWildcard = Accept("video/*") // AudioWildcard Any audio format including MP3, WAV, OGG, AAC, and other supported audio types. // Allows audio file uploads in various formats. AudioWildcard = Accept("audio/*") // ImageJPEG JPEG image format for photos and complex graphics with lossy compression. // Most widely supported image format across browsers and devices. ImageJPEG = Accept("image/jpeg") // ImagePNG PNG image format for graphics and images requiring lossless compression. // Supports transparency and is ideal for logos and simple graphics. ImagePNG = Accept("image/png") // ImageGIF GIF image format supporting simple animations and limited color palettes. // Legacy format still used for simple animations and basic graphics. ImageGIF = Accept("image/gif") // ImageWebP WebP image format providing superior compression compared to JPEG and PNG. // Modern format with excellent compression ratios and quality. ImageWebP = Accept("image/webp") // ImageSVG Scalable Vector Graphics format for resolution-independent vector images. // Perfect for icons, logos, and graphics that need to scale cleanly. ImageSVG = Accept("image/svg+xml") // MimePDF PDF document format for portable documents that preserve formatting. // Universal document format supported across all platforms and devices. MimePDF = Accept("application/pdf") // MimeMSWord Microsoft Word document format for older .doc files (Office 97-2003). // Legacy Word format still commonly used for document exchange. MimeMSWord = Accept("application/msword") // MimeWordDOCX Microsoft Word document format for modern .docx files (Office 2007+). // Current standard Word format with better compression and features. MimeWordDOCX = Accept("application/vnd.openxmlformats-officedocument.wordprocessingml.document") // TextPlain Plain text files without any formatting or special encoding. // Simple text content readable by any text editor or application. TextPlain = Accept("text/plain") // TextCSV Comma-separated values format for structured data and spreadsheets. // Standard format for data exchange between applications. TextCSV = Accept("text/csv") // MimeJSON JSON format for structured data interchange. Common for configuration files, // API data imports, and structured content uploads. MimeJSON = Accept("application/json") // MimeExcel Microsoft Excel spreadsheet format for older .xls files (Office 97-2003). // Legacy Excel format still commonly used for spreadsheet data exchange. MimeExcel = Accept("application/vnd.ms-excel") // MimeExcelXLSX Microsoft Excel spreadsheet format for modern .xlsx files (Office 2007+). // Current standard Excel format with better compression and features. MimeExcelXLSX = Accept("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") // MimeZip ZIP archive format for compressed file collections. Universal archive format // for bundling multiple files into a single compressed upload. MimeZip = Accept("application/zip") // JPG JPEG file extension for photo and image files with lossy compression. // Common extension for camera photos and web images. JPG = Accept(".jpg") // JPEG Alternative JPEG file extension, identical format to .jpg files. // Less common but equivalent to .jpg extension. JPEG = Accept(".jpeg") // PNG PNG file extension for lossless image files supporting transparency. // Preferred for graphics, screenshots, and images requiring transparency. PNG = Accept(".png") // GIF GIF file extension for simple animations and limited-color graphics. // Traditional format for web animations and simple graphics. GIF = Accept(".gif") // WebP WebP file extension for modern efficient image compression format. // Next-generation image format with superior compression capabilities. WebP = Accept(".webp") // SVG SVG file extension for scalable vector graphics and illustrations. // Vector format perfect for icons and graphics requiring infinite scaling. SVG = Accept(".svg") // PDF PDF file extension for portable document format files. // Universal document format maintaining formatting across platforms. PDF = Accept(".pdf") // DOC Microsoft Word document extension for legacy format files. // Older Word format compatible with Office 97-2003 versions. DOC = Accept(".doc") // DOCX Microsoft Word document extension for modern format files. // Current Word standard with better compression and feature support. DOCX = Accept(".docx") // TXT Plain text file extension for simple unformatted text content. // Universal text format readable by any text editor or system. TXT = Accept(".txt") // CSV Comma-separated values file extension for tabular data format. // Standard format for spreadsheet and database data exchange. CSV = Accept(".csv") // JSON JSON file extension for structured data files. // Standard format for configuration, data interchange, and API content. JSON = Accept(".json") // XLS Microsoft Excel file extension for legacy spreadsheet format. // Older Excel format compatible with Office 97-2003 versions. XLS = Accept(".xls") // XLSX Microsoft Excel file extension for modern spreadsheet format. // Current Excel standard with better compression and feature support. XLSX = Accept(".xlsx") // XML XML file extension for structured markup documents. // Extensible markup language for data exchange and configuration. XML = Accept(".xml") // ZIP ZIP file extension for compressed archive files. // Universal archive format for bundling and compressing multiple files. ZIP = Accept(".zip") // VideoMP4 MP4 video format with broad compatibility and good compression. // Most widely supported video format for web and mobile applications. VideoMP4 = Accept("video/mp4") // VideoWebM WebM video format optimized for web delivery and streaming. // Open-source format with excellent compression for web applications. VideoWebM = Accept("video/webm") // AudioMP3 MP3 audio format with universal compatibility and good compression. // Most widely supported audio format across all devices and platforms. AudioMP3 = Accept("audio/mpeg") // AudioWAV WAV audio format providing uncompressed high-quality audio. // Lossless format ideal for professional audio and high-fidelity recordings. AudioWAV = Accept("audio/wav") )
Variables for Accept values
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.