Giter Club home page Giter Club logo

Comments (7)

paulcwarren avatar paulcwarren commented on May 30, 2024 1

Fixed 0.0.8

from spring-content.

heruan avatar heruan commented on May 30, 2024

It does work without the spring prefix, i.e. just content.fs.filesystemRoot, but documentation states:

3.2. Configuring

The following configuration properties (prefix spring.content.fs) are supported.

Property Description
filesystemRoot content store location (defaults to java.io.tmpdir//.

It would be great to have it actually under spring, which is the prefix most Spring libraries are converging to.

from spring-content.

paulcwarren avatar paulcwarren commented on May 30, 2024

I agree. in fact it was originally spring.content.fs.filesystemRoot but we changed it to just content.fs.filesystemRoot in a more general renaming effort to try and get our 'starters' added to the Spring Boots Starters readme. However, that wasn't successful..so I am happy change this back.

from spring-content.

harshalpatil2012 avatar harshalpatil2012 commented on May 30, 2024

Hi Paul where to define content.fs.filesystemRoot. I want to set custom file path in spring boot project to store video.

from spring-content.

paulcwarren avatar paulcwarren commented on May 30, 2024

The property is actually spring.content.fs.filesystemRoot. In a Spring Boot-based application you can define it in a number of places actually. According to this you could put spring.content.fs.filesystemRoot or spring.content.fs.filesystem-root or spring.content.fs.filesystem_root in your application.properties/yaml. Or you could set SPRING_CONTENT_FS_FILESYSTEM_ROOT as an environment variable that you application runs with (which is what you usually do when running it in Kubernetes or Cloudfoundry for example). Let me know if this doesn't work for you.

from spring-content.

harshalpatil2012 avatar harshalpatil2012 commented on May 30, 2024

from spring-content.

paulcwarren avatar paulcwarren commented on May 30, 2024

Unfortunately, Spring Content Filesystem does not support this currently. Spring Content S3 does though. There are actually three ways to do it depending on what you need to achieve. You can create a Store based on an S3ObjectId SID. Alternatively, you can also configure your S3 Storage with a S3ObjectIdResolver. If you are using Spring Data and associating content with Entity's then you can annotate one of your Entity's field with @Bucket. All of these strategies help Spring Content decide the bucket at runtime. You can read more about it here - Section 2.3.

If you don't want to use S3 then we can absolutely add a similar feature to Filesystem. Feel free to create a PR, or raise a dedicated issue for it. We are just finishing up the release 0.1.0 (Spring Boot 2) and then we would be able to pick that up for you.

from spring-content.

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.