HybridCloud
2 Bronze

Atmos-php uploads support file size > 2GB?

Jump to solution

According to EsuHelpers.php and public function createObjectFromFile, there is a comment highlighted currently fails on file size > 2GB, is this still valid?

We are working on PHP version's API to support for file size upload >2GB, please share your experience is PHP able to support?

        public function createObjectFromFile( $file, $acl = null, $metadata = null ) {

                $fd = @fopen( $file, 'rb' );

                if( $fd === false ) {

                        throw new EsuException( "Could not open file \"$file\"" );

                }

                $b = filesize( $file );

                if( $b > 0 ) { // PHP currently fails >2GB

                        $this->totalBytes = $b;

                }

                return $this->createObjectFromStream( $fd, $acl, $metadata, true );

        }

Thank you.

Labels (1)
0 Kudos
1 Solution

Accepted Solutions
JasonCwik
3 Argentum

Re: Atmos-php uploads support file size > 2GB?

Jump to solution

If you're running 64-bit PHP, you should be OK.  However, this problem still exists in 32-bit PHP.  See the warning in the PHP manual:

http://php.net/manual/en/function.filesize.php

View solution in original post

2 Replies
JasonCwik
3 Argentum

Re: Atmos-php uploads support file size > 2GB?

Jump to solution

If you're running 64-bit PHP, you should be OK.  However, this problem still exists in 32-bit PHP.  See the warning in the PHP manual:

http://php.net/manual/en/function.filesize.php

View solution in original post

HybridCloud
2 Bronze

Re: Atmos-php uploads support file size > 2GB?

Jump to solution

Thanks Jason for sharing this, am running Ubuntu 64-bit and should be fine, also tested and returned a 5.0E+19 result from the test code copied from reference PHP manual.

Thank you.

0 Kudos