Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.
TypeScript albumsexif-extractiongeocodinglive-photomotion-photophoto-galleryphoto-sharingwebgl-viewer
import { getRequestWebStream } from 'h3'
import { readSiteBody } from '../../../../../../shared/platform/json'
import { definePlatformHandler } from '../../../../../../shared/platform/runtime'
import { publicSiteContext } from '../../../../../../shared/platform/context'
import { unlockVisitor } from '../../../../../../shared/platform/visitor'
export default definePlatformHandler(async (event) => {
const context = await publicSiteContext(event)
const body = await readSiteBody(getRequestWebStream(event))
return unlockVisitor(
event,
context,
Number(getRouterParam(event, 'albumId')),
body?.password,
useRuntimeConfig(event).platform.secret,
)
})