Skip to content
loading...

re: Resumable file upload in PHP: Handle large file uploads in an elegant way VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Last time I looked at Tus you couldn't control the filename on the server-side - is it still like that? I was looking to replace using Minio with ...
 

Hi @ohffs ,

Thank you for trying the package.

If you are using both tus-php client and server you can provide file name in client itself. For eg:

$client->setKey($uploadKey)->file('/path/to/file', 'my-awesome-file.mp4');

If you want to do it in server side you can do it using hooks which is coming soon in new version: github.com/ankitpokhrel/tus-php/pu...

$server->event()->addListener(
    'tus-server.upload.complete',
     function (\TusPhp\Events\TusEvent $event) {
        // Perform post upload operation.
        // For instance, renaming a file in your case
    });

Hope that address your issue. Feel free to open issue in case you need any help.

 

Oh - thanks for that! Sadly I'd be using the Golang server (embedded device so no PHP) - but I see now it has hooks too so I might be able work something out :-). Thanks for the tip! :-D

code of conduct - report abuse