• Resolved hercilioseox

    (@hercilioseox)


    Hey there, I was working with some private files and I wanted to use the client you’d instantiated to get objects from the s3 bucket. The problem is that the method that should return the object isn’t returning anything.

    The method is the following:

    
    /**
     * Download object, destination specified in args.
     *
     * @see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-s3-2006-03-01.html#getobject
     *
     * @param array $args
     */
    public function get_object( array $args ) {
        $this->s3_client->getObject( $args );
    }

    And it can be found in the class:

    DeliciousBrains\WP_Offload_Media\Providers\Storage\AWS_Provider.

    I really need this method to conclude my work here. Please, answer me as fast as possible 🙂

    • This topic was modified 4 years, 6 months ago by hercilioseox.
    • This topic was modified 4 years, 6 months ago by hercilioseox.
Viewing 1 replies (of 1 total)
  • Plugin Author Delicious Brains

    (@deliciousbrains)

    Hi @hercilioseox,

    The function is working as expected, the doc block comment explains this:

    Download object, destination specified in args.

    It uses the SaveAs arg to write the object to disk.

    However, you should not use WP Offload Media’s internal classes as an SDK, they may change without notice.

    Instead, you should use the as3cf_get_attachment_url or as3cf_get_secure_attachment_url functions that WP Offload Media exposes, or download and embed the AWS PHP SDK yourself into your custom plugin.

    -IJ

Viewing 1 replies (of 1 total)

The topic ‘Very bad issue found: method AWS_Provider::get_object doesn’t return anything’ is closed to new replies.