File size and dropbox add-on
-
Hello!
I think that I’ve found an issue in WPDM and Dropbox Add-on.
The public page that I’ve created for show my files uploaded from my dropbox account, shows files size of 0 for all files.
I’ve added some code in functions.php file at line 995foreach ($vars['files'] as $f) { //Fix - Calc remote file size -> Es. Dropbox if ((stripos($f, 'https://') == 0) || (stripos($f, 'https://') == 0)){ $headers = get_headers($f); $size += $headers['Content-Length']; foreach ($headers as $index => $value) { $values = split(':', $value ); if ($values[0]=='Content-Length'){ $size += $values[1]; } } }//End fix else if (file_exists($f)){ $size += @filesize($f); } else{ $size += @filesize(UPLOAD_DIR . $f); } }
I hope it can help someone.
Reguards
- The topic ‘File size and dropbox add-on’ is closed to new replies.