Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filesize function only properly works if using native WordPress storage #180

Open
ddbradshaw opened this issue Nov 20, 2017 · 0 comments
Open

Comments

@ddbradshaw
Copy link

I have a client that doesn't use the native WordPress storage for files, instead they use Windows Azure for file storage. This being the case, the file_exists method always returns false. Here's a workaround that worked for me in the class.attachments.php

$head = array_change_key_case(get_headers($file_path, TRUE));
$filesize = $head['content-length'];
$formatted = size_format( $filesize );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant