Coder Social home page Coder Social logo

Comments (2)

elpete avatar elpete commented on July 26, 2024

Looks like the docs need to be updated with the S3Provider. Here is the init method for the S3Provider:

	/**
	 * Configure the provider. Usually called at startup.
	 *
	 * @properties A struct of configuration data for this provider, usually coming from the configuration file
	 *
	 * @return S3Provider
	 */
	public IDisk function configure( required string name, struct properties = {} ){
		try {
			variables.s3 = variables.wirebox.getInstance( "AmazonS3@s3sdk" );
		} catch ( any e ) {
			throw(
				type    = "cbfs.ProviderConfigurationException",
				message = "The the S3Provider encountered a fatal error during configuration. The message received was #e.message#."
			);
		}

		if ( !arguments.properties.keyExists( "bucketName" ) ) {
			arguments.properties.bucketName = variables.s3.getDefaultBucketName();
		}

		if ( !arguments.properties.keyExists( "visibility" ) ) {
			arguments.properties.visiblity = "public";
		}

		setName( arguments.name );
		setProperties( arguments.properties );
		return this;
	}

So you need s3sdk installed, and you can optionally pass bucketName and visibility.

What I don't see is any way to configure the underlying S3 instance from cbfs. My guess is you would configure the s3sdk directly. That doesn't allow for interacting with multiple S3 instances, though....

from cbfs.

jclausen avatar jclausen commented on July 26, 2024

The documentation for S3 configuration is available here: https://cbfs.ortusbooks.com/getting-started/providers/s3-provider

from cbfs.

Related Issues (20)

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.