Search code examples
phpsessionfile-uploadstatusbar

Track file upload status from other client (other session) with PHP


I have examined several ways of getting file upload status, but all they assume that we need to use the same session (e.g. we can create progress bars for client ).

What I need to achieve, is to track file upload statuses of files, that are being uploaded from other clients. For example, it would be an admin panel with the list of logged-in clients, and the admin would be able to see statuses of file uploads (percentage, amount) of these clients in real-time.

One way that I was thinking about is to track session names and "session.upload_progress.name"s from clients, and then get file upload statuses by sending this information from my server to some upload_status.php script. But it seems to be a little difficult and perfromance-consuming, especially when I have many clients at the same time.

Are there any more simple or straightforward ways to achieve this?


Solution

  • After many considerations we have decided to update clients and to implement file uploading by chunks. Then we can simply update current upload status for every client in the script for uploading.

    This information can be stored im database, in memcache etc. and can be easily accessed by admin server.

    If someone has other considerations or thoughts please feel free to express your opinions.