Chimp75's avatar

Uploading to S3 not working (only directory get uploaded)

Everything is compiling and the Directory structure of public get uploaded to my S3 but none of the file that are in there do. Any ideas ? Btw I would appreciate any improvement I can make on this fairly simple build script (Elixir was much easier to grasp for me).

let mix = require('laravel-mix');
let S3Plugin = require('webpack-s3-plugin')


mix.js('resources/assets/js/app.js', 'public/js')
   .sass('resources/assets/sass/app.scss', 'public/css')
   .copy('resources/assets/img/*', 'public/images');

if (mix.inProduction()) {
  
  mix.version()
     .webpackConfig({
        plugins: [
          new S3Plugin({
                s3Options: {
                    accessKeyId: process.env.MIX_S3_ACCESS_KEY_ID,
                    secretAccessKey: process.env.MIX_S3_SECRET_ACCESS_KEY,
                    region: process.env.MIX_S3_REGION,
                    endpoint: process.env.MIX_S3_ENDPOINT,
                },
                s3UploadOptions: {
                  Bucket: process.env.MIX_S3_BUCKET
                },
                cdnizerOptions: {
                  defaultCDNBase: process.env.MIX_S3_ADDRESS
                },
                directory: 'public'
            })
          ]
        });
}
0 likes
1 reply
Chimp75's avatar
Chimp75
OP
Best Answer
Level 2

The script was actually working. Cyberduck was just not reflecting the changes for files only directory (with fortrabbit object storage)

Please or to participate in this conversation.