feat: organize uploads by folder + cdn.hotelsync.ru active
- Upload route now accepts ?folder=categories|rooms|hotels|guests
- Files saved to /uploads/{folder}/uuid.ext, served at cdn.hotelsync.ru/{folder}/uuid.ext
- api.upload.photo() accepts optional folder param (default: 'rooms')
- RoomCategoriesPage passes folder='categories' on photo upload
- SSL cert issued and nginx config active for cdn.hotelsync.ru
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -59,7 +59,7 @@ function CategoryForm({ category, onClose, onSave }: CategoryFormProps) {
|
||||
if (!list.length) return
|
||||
setUploading(true)
|
||||
try {
|
||||
const urls = await Promise.all(list.map(f => api.upload.photo(f)))
|
||||
const urls = await Promise.all(list.map(f => api.upload.photo(f, 'categories')))
|
||||
setPhotos(prev => {
|
||||
const next = [...prev, ...urls]
|
||||
setPhotoIdx(next.length - 1)
|
||||
|
||||
Reference in New Issue
Block a user