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

leoneparise's avatar

Laravel Vapor and mobile upload

I couldn't find any example on how Vapor handles file upload, only a NodeJs example. How can I upload files using Vapor from a native mobile app? What's the workflow and how I can implement it myself?

0 likes
4 replies
Loach's avatar

Did you ever find any solution to this?

Loach's avatar

I think maybe you can do this just using the storage facade?

erikgall's avatar

@leoneparise @loach - I had to figure out a way to handle native mobile app file uploads without having to go through a whole release of a new version of the apps in the iOS and Google Play store. What I did is pretty easy and simple -

  1. Spin up a small server w/ Forge & deploy your application inside the same VPC as your app running via Vapor (it has to be on a public subnet).
  2. Add a DNS entry pointing a subdomain (I went with mobile.api.{domain}.com since our normal app runs at api.{domain}.com
  3. Configure API Gateway to proxy all requests for that endpoint (our endpoint was something like api/v3/calls/{id}/response) to a custom URL (mobile.api.{domain}.com) that is able to do file uploads the traditional way to AWS S3.

Boom 💥you now have mobile file uploads working with 0 changes to the code

Please or to participate in this conversation.