"As a marketer, I'd like to upload HTML content that I've prepared on another tool/platform."
Enable marketers to import pre-built HTML content (emails and onsite content) from external tools by uploading structured file packages.
email-content.zip
├── index.html (required)
├── style.css (optional, embedded styles preferred)
├── images/
│ ├── logo.png
│ ├── banner.jpg
│ └── icon.svgonsite-content.zip
├── index.html (required)
├── style.css (optional)
├── script.js (optional)
├── images/
│ ├── hero-image.jpg
│ ├── product-1.png
│ └── background.svgindex.html// Before processing
<img src="./images/logo.png" alt="Logo">
<img src="images/banner.jpg" alt="Banner">
<img src="hero-image.png" alt="Hero">
// After processing
<img src="https://cdn.ourplatform.com/assets/abc123/logo.png" alt="Logo">
<img src="https://cdn.ourplatform.com/assets/abc123/banner.jpg" alt="Banner">
<img src="https://cdn.ourplatform.com/assets/abc123/hero-image.png" alt="Hero">┌─────────────────────────────────────┐
│ Choose Content Type │
├─────────────────────────────────────┤
│ ○ Email Campaign │
│ ○ Landing Page/Onsite Content │
│ │
│ [Continue] │
└─────────────────────────────────────┘┌─────────────────────────────────────┐
│ Upload HTML Content │
├─────────────────────────────────────┤
│ ┌─────────────────────────────────┐ │
│ │ Drag & Drop Zone │ │
│ │ │ │
│ │ 📁 Drop your ZIP file here │ │
│ │ or click to browse │ │
│ │ │ │
│ │ Supported: .zip (max 25MB) │ │
│ └─────────────────────────────────┘ │
│ │
│ File Requirements: │
│ • Single HTML file (index.html) │
│ • Images in root or images folder │
│ • CSS/JS files in root │
└─────────────────────────────────────┘┌─────────────────────────────────────┐
│ Processing Content... │
├─────────────────────────────────────┤
│ ✓ Extracting files │
│ ✓ Validating structure │
│ ⏳ Uploading images to CDN │
│ ⏳ Processing HTML content │
│ ⏳ Updating asset references │
│ │
│ [████████░░] 80% │
└─────────────────────────────────────┘┌─────────────────────────────────────┐
│ Import Summary │
├─────────────────────────────────────┤
│ Content Type: Email Campaign │
│ Files Processed: 8 │
│ Images Uploaded: 5 │
│ Warnings: 1 │
│ │
│ ⚠️ 1 image reference not found: │
│ "missing-icon.png" │
│ │
│ [Preview Content] [Import Anyway] │
│ [Cancel Import] │
└─────────────────────────────────────┘┌─────────────────────────────────────┐
│ Content Preview │
├─────────────────────────────────────┤
│ [Desktop] [Tablet] [Mobile] │
│ │
│ ┌─────────────────────────────────┐ │
│ │ Rendered HTML Preview │ │
│ │ │ │
│ │ [Content displays here] │ │
│ │ │ │
│ └─────────────────────────────────┘ │
│ │
│ [Edit Content] [Save & Continue] │
│ [Back to Upload] │
└─────────────────────────────────────┘┌─────────────────────────────────────┐
│ Upload Failed │
├─────────────────────────────────────┤
│ ❌ File validation failed │
│ │
│ Issues found: │
│ • No index.html file found │
│ • File size exceeds 25MB limit │
│ • Unsupported file format │
│ │
│ [Try Again] [View Requirements] │
└─────────────────────────────────────┘┌─────────────────────────────────────┐
│ Import Completed with Warnings │
├─────────────────────────────────────┤
│ ⚠️ Some issues were found: │
│ │
│ Missing Images (2): │
│ • background-pattern.png │
│ • social-icon.svg │
│ │
│ Large Files (1): │
│ • hero-banner.jpg (4.2MB) │
│ │
│ [View Details] [Continue Anyway] │
│ [Fix Issues] │
└─────────────────────────────────────┘def validate_zip_structure(zip_file):
required_files = ['index.html']
allowed_extensions = ['.html', '.css', '.js', '.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp']
# Check for required files
# Validate file extensions
# Check file sizes
# Verify no nested folders (except images/)def process_assets(extracted_files, content_type):
images = extract_images(extracted_files)
uploaded_images = upload_to_s3(images)
html_content = update_image_references(
html_file=extracted_files['index.html'],
image_mapping=uploaded_images
)
return {
'html': html_content,
'assets': uploaded_images,
'warnings': check_missing_references(html_content)
}const FileUploader = {
acceptedTypes: '.zip',
maxSize: 25 * 1024 * 1024, // 25MB
onDrop: handleFileUpload,
validation: validateFileStructure,
progressCallback: updateProgress
}const ContentPreview = {
renderModes: ['desktop', 'tablet', 'mobile'],
sanitizeHTML: true,
allowedTags: [...], // Email-safe HTML tags
onEdit: openContentEditor
}./, ../, and direct referencesemail-template.zip
├── index.html
├── logo.png
├── header-bg.jpg
└── social-icons.pnglanding-page.zip
├── index.html
├── styles.css
├── script.js
├── hero-image.jpg
├── product-shot.png
└── favicon.ico❌ nested-folders.zip
├── templates/
│ └── index.html
└── assets/
└── images/
└── logo.png
❌ multiple-html.zip
├── page1.html
├── page2.html
└── main.html
❌ no-html.zip
├── styles.css
├── script.js
└── images/
└── banner.jpg