chciałbym zapytać czy np. progress wgrywania pliku na serwer uploadu np. megaupload.com oparty o SESJE albo np. o MEMCACHED jest dobrym rozwiązaniem. ? Tzn. proces wgrywania pliku to pętla while która czyta plik:
if ($data === false) { } if ($sendbyte === false) { } $totalsend += $sendbyte; $this->CI->memcached_library->set('progress/'.$uid, $percent, 10); }
Całość jest odczytywana poprzez zapytanie wysyłane poprzez javascript .get() - funkcje jquery
Metoda:
* * * @return int - Procent of progress */ public function progress_status() { $uid = $this->uri->segment(3); { } // We download the progress status from Memcached ! // We delete the cache file if($progress == 100) { $this->memcached_library->delete('progress/'.$uid, NULL); } }
Czekam na opinie ?