Update the filename when save file
prabhatjhaba opened this issue · comments
Prabhat jhaba commented
Hi
Can we have a example where we can change the name of the file when it get saved, right it keeps original file name from the request header when it get saved. I do not see any method that can change the file name.
Thanks in advance.
Ankit commented
@prabhatjhaba you can use events to update the filename once it get uploaded.
$server->event()->addListener('tus-server.upload.complete', function (\TusPhp\Events\TusEvent $event) {
$fileMeta = $event->getFile()->details();
// Rename your file here.
});
github-actions commented
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
github-actions commented
Closing because of inactivity.