Back to Main Site

PolyCMS Media Library Guide for RISE CRM

Last updated on Nov 22, 2026 11:05 AM 11:05 AM 1,735.74 ms

The PolyCMS Media Library centralizes image and document management for all CMS posts, pages, banners, and themes inside RISE CRM. Accessed via PolyCMS > Media, it isolates every upload in {rise_crm_root}/files/polycms/ (secured with .htaccess), tracks file metadata in the blog_media database table, and enforces 6-layer server-side upload security without interfering with core RISE CRM client or project files.

Upload Methods

PolyCMS provides three streamlined ways to upload images and documents into your library.

Drag-and-Drop Upload

Open PolyCMS > Media (/polycms/media) and drag one or more files directly from your computer onto the Media Library canvas. Multiple files upload concurrently into the currently selected folder.

Browse Upload

Click the Upload button in the Media Library toolbar to launch your operating system file picker. Select a single file or batch-select multiple files to upload at once.

In-Editor Upload

While editing a post, page, or MTBuilder layout, insert media directly from the self-hosted TinyMCE editor or featured image selector. The Media Library modal opens inline so you can pick existing assets or upload new files without leaving the editor.

Directory Structure and Storage Path

All CMS media files are stored inside a dedicated, .htaccess-protected storage directory:

{rise_crm_root}/files/polycms/

By default, PolyCMS organizes uploads automatically using a Year/Month/Day directory hierarchy:

files/polycms/
|-- 2026/
|   |-- 05/
|   |   |-- 15/
|   |   |   |-- hero-banner.jpg
|   |   |   `-- hero-banner-thumb.jpg
|   |   `-- 16/
|   `-- 06/
`-- .htaccess

This isolated directory structure prevents filename collisions, keeps large asset libraries fast to navigate, and ensures CMS files never mix with RISE CRM invoices, estimates, tickets, or client portal uploads. You can also create custom subfolders directly from the Media Library sidebar.

View Modes and Library Features

Switch between two layout modes in the top toolbar depending on your workflow:

Mode Description
Grid View Visual thumbnail grid designed for quick browsing and selecting images
List View Structured table displaying filename, file size, pixel dimensions, and upload date

Key management capabilities built into PolyCMS > Media include:

  • Directory Tree Browser - Navigate date-based folders and custom subfolders from the collapsible sidebar tree.
  • File Type Filtering - Narrow the library to Images, Documents, or All Files.
  • Lightbox Preview - Click any image to inspect a full-size preview in an overlay without navigating away.
  • Automatic Thumbnails - Generates optimized thumbnails for uploaded images to speed up admin browsing and frontend rendering.
  • File Details Inspector - Inspect filename, pixel dimensions, file size, upload date, and copyable direct URL for any asset.

6-Layer Upload Security

Every upload submitted through the admin panel or REST API passes through a 6-layer server-side validation pipeline:

  1. File Extension Validation - Accepts only whitelisted file extensions (jpg, jpeg, png, gif, webp, svg, pdf, and approved document types). Executable extensions (.php, .exe, .sh, .phtml) are strictly blocked.
  2. MIME-Type Verification - Inspects actual file contents on the server to confirm the detected MIME type matches the declared extension, stopping spoofed uploads.
  3. Magic Bytes Verification - Reads the binary header signature of each file to validate its true format.
  4. Content Scanning - Scans uploaded payloads for embedded PHP tags, <script> blocks, and malicious directives to prevent Remote Code Execution (RCE).
  5. Double-Extension Blocking - Automatically rejects deceptive filenames such as image.php.jpg or shell.phtml.png.
  6. GD Image Reprocessing - Reprocesses raster images through the PHP GD library to strip hidden metadata payloads while preserving crisp visual quality.

Combined with the .htaccess rules inside files/polycms/, direct PHP execution inside the media directory is disabled at the web server layer as well.

Database-Backed Media Tracking

Every file uploaded through PolyCMS is indexed in the {db_prefix}blog_media table (default rise_blog_media). Each media record stores structured metadata for fast lookups, SEO alt attributes, and REST API operations:

Field Description
filename Original sanitized file name
path Relative storage path inside files/polycms/ (for example, 2026/05/17/image.jpg)
url Full public URL used for frontend display
alt_text Alternative text for accessibility and image SEO
title / caption Descriptive title and optional display caption
mime_type Server-verified MIME type
file_size File size recorded in bytes
width / height Pixel dimensions for uploaded images
author_id RISE CRM staff user ID who uploaded the file

Posts and pages reference their featured image via feature_image_id (foreign key link to blog_media) while retaining the feature_image path string for rapid frontend rendering.

Safe Deletion

Before permanently deleting an asset from PolyCMS > Media, PolyCMS checks whether the file is currently referenced by any published or draft post or page. If references exist, you receive a confirmation warning so you do not break live frontend layouts. When confirmed, deleting a tracked media item automatically cascade-clears its feature_image_id references across linked content.

Related Documentation