Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Husniddin's avatar

Store files via base64 and formData in one request

Whole project used to use formData binary for file upload. Now I need to change request to make file upload via raw Json base64. Problem is old APIs must work also

I mean before be send like

files[] (binary)

for now both must be possible like

files[] base64 document

0 likes
2 replies
Tray2's avatar
Tray2
Best Answer
Level 73

I would suggest that you keep the existing API and then create a new one for the base64, don't try to combine them.

Please or to participate in this conversation.