Files
intotheeast-com-content/pages/02.post/post-form.md
T
m038 bf5b5c2f3c feat(post-form): client-side HEIC->JPEG photo picker (U4)
Replace /post's managed filepond field with a controlled 'photos' field
(theme forms/fields/photos) + picker logic in post-form.js: magic-byte
sniff (ISO-BMFF ftyp brands, not filename/MIME), lazy import('heic-to')
only for real HEIC (deferred 3MB chunk via ESM splitting), per-thumbnail
converting/uploading/done/error states, in-flight counter gating Submit,
and fail-closed skip on conversion failure. Converted JPEGs POST to Grav's
AJAX file-upload route into the form flash (the only path copyFiles reads),
so add-page-by-form attaches them on submit. Web-format photos pass through.

Refs R8, R9, R16, R17, AE1, AE4, KTD4.
2026-07-04 16:38:13 +02:00

4.3 KiB

title, template, access, pageconfig, pagefrontmatter, form
title template access pageconfig pagefrontmatter form
New Entry post-form
site.login
true
slug_field overwrite_mode
date,title false
template published
entry true
name action enctype fields novalidate buttons process
new-entry /post multipart/form-data
name label type autofocus validate
title Title text true
required
true
name label type default format validate
date Date & Time datetime now Y-m-d H:i
required
true
name label type rows validate
content What happened today? textarea 10
required
true
name label type multiple destination limit accept
photos Photos (max 4) photos true @self 4
image/*
name label type placeholder
lat Latitude text tap "Get Location" below
name label type placeholder
lng Longitude text
name label type placeholder
location_city City text e.g. Kyoto
name label type placeholder
location_country Country text e.g. Japan
name label type default options
weather_desc Weather Condition select
Sunny Partly cloudy Cloudy Foggy Drizzle Rain Snow Thunderstorm
— none — ☀️ Sunny Partly cloudy ☁️ Cloudy 🌫️ Foggy 🌦️ Drizzle 🌧️ Rain ❄️ Snow ⛈️ Thunderstorm
name label type placeholder validate
weather_temp_c Temperature (°C) number tap "Get Weather" or type it
min max
-60 60
name label type default options
transport_mode How I got here select
walking bicycle bus train car plane
— not specified — 🚶 Walking 🚲 Bicycle 🚌 Bus 🚆 Train 🚗 Car ✈️ Plane
name label type classes placeholder help
hero_image Hero Image Filename text advanced-field photo.jpg Filename of the hero/header image. Leave blank to use the first uploaded photo.
name label type classes highlight default options validate
force_connect Force connector line toggle advanced-field 0 0
1 0
Yes No
type
bool
name label type classes highlight default options validate
featured Featured highlight toggle advanced-field 0 0
1 0
Yes No
type
bool
true
type value classes
submit Post Daily btn-post
add_page upload message reset
true true Entry posted successfully! true