Commit Graph

6 Commits

Author SHA1 Message Date
payacom
0cfec31f52 fix: parse multipart uploads for shop-chat files and chat-room images
Same root cause as the shop logo fix: these two routes still expected
req.files.<field> (the removed express-form-data pattern) with no
multer middleware in front of them, so:
- POST /shop-chat/:shopId/messages/file always rejected with "فایل
  الزامی است" even when a valid image/video was sent.
- POST /chat-rooms room creation silently dropped room_image, and
  would lose all text fields (title, visibility, ...) whenever the
  request was multipart (i.e. whenever an image was attached).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-28 17:01:43 +03:30
payacom
fade8543e2 e2ee 2026-10-02 18:13:34 +03:30
payacom
d4ebc20aa8 reels 2026-10-01 21:12:05 +03:30
payacom
e1abb40cc6 Reduce media bandwidth: compress uploads, add long-lived cache headers, gzip API
- Resize/re-encode every uploaded image server-side (posts, avatars, stories,
  shop products/logo, chat messages) via a shared sharp-based optimizer —
  caps dimensions to what's actually displayed and re-compresses in place,
  cutting a typical raw camera photo by ~90% with no visible quality loss
- Cap uploaded video resolution/bitrate (re-encode only when above 1280px/
  ~2.5Mbps) alongside the existing faststart step; apply faststart+cap to
  story and chat videos too (previously stored completely raw)
- Add long-lived Cache-Control to all /storage static routes so clients stop
  re-downloading unchanged media on every request
- Add gzip/brotli compression for JSON API responses (feed/explore/chat)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 17:55:09 +03:30
payacom
c302aea177 4.1.3 2026-09-13 21:32:36 +03:30
payacom
3f416a7a60 full 2026-08-31 20:45:41 +03:30