Coder Social home page Coder Social logo

Comments (5)

matrus2 avatar matrus2 commented on August 19, 2024

Hey,
Based on this document:
http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html

All you need to do is to have the bucket name and aws region (all aws s3 urls are constructed based on these two). If you want to upload assets to specific directory use basePath parameter.

If you have further problems/questions please provide more description or minimal example showing your problem. Thx

from webpack-s3-uploader.

OmgImAlexis avatar OmgImAlexis commented on August 19, 2024

So something like this should work? static.twistly.xyz is my minio server. minio expects us-east-1 for it's region. The bucket I have setup is twistly.

new S3Uploader({
    s3Options: {
        accessKeyId: process.env.AWS_ACCESS_KEY_ID,
        secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
        region: 'us-east-1',
        endpoint: 'static.twistly.xyz'
    },
    s3UploadOptions: {
        Bucket: 'twistly'
    }
})

When using this I get an error.

Uploading [      ----------------------------------------------------------------------------------------------] 6% 71.4sError: UnknownEndpoint: Inaccessible host: `twistly.static.twistly.xyz'. This service may not be available in the `us-east-1' region.
    at handleErrors (/Users/xo/code/twistly-frontend/node_modules/webpack-s3-uploader/s3_uploader.js:33:6)
    at getAssetFiles.then.then.then.then.catch.e (/Users/xo/code/twistly-frontend/node_modules/webpack-s3-uploader/s3_uploader.js:92:21)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)

from webpack-s3-uploader.

matrus2 avatar matrus2 commented on August 19, 2024

I assume you have a s3 bucket twistly in us-east-1 region and minio server is pointing to this bucket, correct?

EDIT: Based on docs s3Options there is no such param as endpoint.

from webpack-s3-uploader.

OmgImAlexis avatar OmgImAlexis commented on August 19, 2024

Minio is an object storage server compatible with Amazon S3 APIs so I'm not actually using s3 itself.

I think this is the reason it's not working. The underlying library is creating the url incorrectly for minio. The bucket url should be http://static.twistly.xyz. The bucket's name is twistly. Minio's region is set to accept us-east-1.

https://github.com/shreyawhiz/node-s3-client/blob/a06ab02fa9e7cc92b6f762ef0200423184ff12c1/lib/index.js#L1435-L1453

from webpack-s3-uploader.

matrus2 avatar matrus2 commented on August 19, 2024

Closing as this plugin is supposed to work directly with s3.

from webpack-s3-uploader.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.