Skip to content

s3 configuration #24

Closed
Closed

Description

@GDLaw

Travis,

If I set the default s3 configuration to contain the path settings and the access keys I need to use for my s3 space, do I need to specify this configuration again in the model for each file upload? If my global s3 configurations are set to what I want them to be can I just specify the s3 filesystem as the filesystem to use?

for instance:

public function __construct(array $attributes = array()) 
{

    $this->hasAttachedFile('imgfile', [
        'styles' => [ 'large' => '980x550', 'medium' => '640x360', 'thumbnail' => '230x130' ],
        'storage' => 'filesystem'           
    ]);

    $this->hasAttachedFile('mp3file', [
        'styles' => [],
        'storage' => 's3'
    ]);

    $this->hasAttachedFile('mp4file', [
        'styles' => [],
        'storage' => 's3'           
    ]);

    $this->hasAttachedFile('pdffile', [
        'styles' => [],
        'storage' => 's3'           
    ]);

    parent::__construct($attributes);

}

Activity

  1. tabennett commented on Jan 21, 2014

    @tabennett
    Contributor

    "If I set the default s3 configuration to contain the path settings and the access keys I need to use for my s3 space, do I need to specify this configuration again in the model for each file upload?"

    No, you can set them once in your global config and it will cascade down into your model config (unless you specifically override them there in the model, which in you're case isn't what you're doing).

    "If my global s3 configurations are set to what I want them to be can I just specify the s3 filesystem as the filesystem to use?"

    Yes

  2. GDLaw commented on Jan 21, 2014

    @GDLaw
    Author

    Great! Thanks Travis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions