Models Bulk Import
Overview
The Models Bulk Import page allows administrators to import multiple model/performer profiles at once from CSV-formatted data. This tool supports comprehensive field mapping through saveable "playlists," automatic profile image downloading, duplicate detection, and asynchronous batch processing with real-time progress tracking.
[Screenshot: models-bulk-import-main-form]
Getting to This Page
- Log in to the admin panel at
ct/admin/ctlogin.php - In the left sidebar, click Models
- Click Bulk Import or navigate directly to
ct/admin/modelsbulkimport.php
This page is designed for importing model profile data from external sources, agency databases, or CSV exports. All data is previewed before final import.
System Requirements
This page requires the following system dependencies to function properly.
PHP Requirements
Required PHP Extensions
Required PHP Functions
These functions must NOT be in
disablefunctions in php.ini:
Folder Permissions
Server Requirements
Installation Requirements
Folders Required
External Dependencies
Page Layout
Header Section
The page header displays:
- Title: "Model Bulk Import" with a users icon
- Breadcrumb: Dashboard > Models > Bulk Import
- Description: "Import multiple model profiles from CSV data"
[Screenshot: models-bulk-import-header]
Playlist Section
The playlist section allows you to save and load field mapping configurations:
[Screenshot: models-bulk-import-playlist-section]
Save commonly used import configurations as playlists to speed up future imports from the same data source.
Field Mapping Section
The dynamic field mapping section lets you configure how CSV columns map to database fields:
[Screenshot: models-bulk-import-field-mapping]
Available Field Mappings
Import Options Section
[Screenshot: models-bulk-import-options]
Import Data Section
Features & Functions
Field Mapping Playlists
Purpose: Save and reuse field mapping configurations for repeated imports from the same source.
How to use:
- Configure your field mappings using the column dropdowns
- Enter a unique name in the "Playlist Name" field
- Click Save to store the configuration
- Future imports can load this configuration instantly via the dropdown
Playlist data stored:
- Field mappings (which column = which field)
- Delimiter setting
- All import options (status, check duplicates, etc.)
Create separate playlists for different data sources: "Agency A Export", "CamModelDB CSV", "Manual Entry", etc.
Duplicate Detection
Purpose: Prevent duplicate model entries from being imported.
Detection methods:
- Model name comparison (case-insensitive)
- Hash value comparison (if provided)
Behavior:
- If duplicate found, entry is skipped
- Log message shows rejection reason
- Count tracked in duplicates stat
Profile Image Download
Purpose: Automatically download model profile and cover images during import.
How it works:
- Map a CSV column to field #19 (Profile Image URL) or #20 (Cover Image URL)
- During import, each URL is:
- Downloaded via cURL
- Saved to
ct/uploads/modelimages/ - Filename:
model{id}profile.jpgormodel{id}cover.jpg - Database updated with local path
Image download significantly increases import time. For large imports, consider downloading images separately after initial data import.
Asynchronous Processing
The import runs asynchronously with real-time progress tracking:
- Preview Step: Data is validated and temp files created
- Run Step: AJAX call triggers background processing
- Status Polling: Frontend polls for progress every 500ms
- Progress File: JSON file tracks done/total/logs
Progress tracking files:
ct/admin/temp/modelimportprogress.json- Current statusct/admin/temp/modelimportdata- Raw import datact/admin/temp/modelimportxlat- Field mappings (serialized)ct/admin/temp/modelimportopts.json- Import options
Step-by-Step Usage
Task 1: Basic CSV Import
This workflow imports model profiles from simple CSV data with name and basic attributes.
Steps:
- Navigate to Admin Panel → Models → Bulk Import
- Configure field mappings:
- Column 1: Select "Model Name"
- Column 2: Select "Gender"
- Column 3: Select "Country"
- Click Add Column for additional fields
- Paste your CSV data in the textarea:
Jane Doe,Female,United States
Anna Smith,Female,United Kingdom
Maria Garcia,Female,Spain
- Verify delimiter is set correctly (comma, tab, etc.)
- Set Status to "Active" or "Inactive"
- Check Check Duplicates to prevent duplicate entries
- Click Preview Import
- Review the preview table showing parsed data
- Click Confirm & Start Import
- Monitor real-time progress bar and log messages
Result: Models are added to tblModels with specified status.
[Screenshot: models-bulk-import-progress-screen]
Task 2: Import with Profile Images
Steps:
- Add a column mapping for field #19 (Profile Image URL)
- Include image URLs in your CSV:
Jane Doe,Female,https://example.com/janeprofile.jpg
Anna Smith,Female,https://example.com/annaprofile.jpg
- Check Download Images option
- Run the import
Result: Models are created AND profile images are downloaded and saved locally.
Task 3: Using Saved Playlists
Steps:
- Configure all field mappings and options
- Enter a playlist name (e.g., "Agency A Export")
- Click Save
- For future imports, select the playlist from the dropdown
- Settings are automatically loaded
- Paste new data and proceed with import
Progress Interface
During import, the progress interface displays:
Progress Bar
- Animated striped bar showing percentage complete
- Percentage text (e.g., "45%")
Status Line
- Shows "Processed X of Y" count
- Indicates "Complete" when finished
Log Panel
- Scrollable list of import events
- Color-coded messages:
- Green: Success messages
- Yellow: Warnings
- Red: Errors
Statistics Cards
Navigation Buttons
- Admin Home: Return to dashboard
- New Import: Start a fresh import
[Screenshot: models-bulk-import-progress-stats]
Error Messages & Troubleshooting
Common Errors
Troubleshooting
Problem: Import stalls at 0%
Solution:
Check browser console for JavaScript errorsVerify ct/admin/temp/ folder exists and is writable
- Check
ct/logs/modelbulkimport.logfor PHP errors
Problem: Profile images not saving
Solution:
- Verify
ct/uploads/modelimages/folder exists with write permissions - Check if image URLs are accessible
- Review log for cURL errors
Problem: Progress bar shows but logs are empty
Solution:
- Session may have expired; re-login
- Progress JSON file may be corrupted; delete temp files and retry
Related Pages
- Models (
ct/admin/models.php) - Manage model records - AI Model Data Update (
ct/admin/aimodeldataupdate.php) - AI-powered data enhancement
Tips & Best Practices
Use unique model names: Model name is the primary identifier. Ensure each model has a unique stage name to avoid duplicate issues.
Create playlists for each source: Save time by creating dedicated playlists for each data source you regularly import from.
Test with small batches first: Before importing hundreds of models, test with 5-10 rows to verify field mappings are correct.
Check data encoding: Ensure your CSV file is UTF-8 encoded. Special characters may cause issues with other encodings.
Download images separately: For large imports (100+ models), import basic data first, then run a separate batch to download images.
Translatable Strings
The following text elements should be added to backend translations: