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

winner1's avatar

Upload files to an alternative server

I'm trying to get the posted file and send it to an alternative server that saves the files and handles file request like a directory listing

let's suppose my that alternative server doesn't use Laravel(Plain PHP), I don't want to use FTP because I found out its a little(or more!) slow

should I use curl or is there any special way in Laravel? Thanks in advance

0 likes
1 reply
lostdreamer_nl's avatar
Level 53

the cleanest way would be to use the FileSystem in combination with any type of driver to set it up for a connection to the external server ( (s)ftp / webdav / etc. )

But nothing is holding you back from simply accepting the file and doing it via an HTTP request with curl / Guzzle.

1 like

Please or to participate in this conversation.