Tim Holloway wrote:Apparently buildSessionFactory() was deprecated as far back as 2011. That's 10 years of software erosion there.
It's also, I assume, part of legacy Hibernate, not Hibernate JPA, and I've been recommending that people migrate to JPA for many years now.
It's not true that you can write software and it "never wears out". The software may remain unchanged, but the world that contains it does not, and eventually, not only is it more and more likely to fail in time and there will be fewer and fewer people who can help.
And, alas, I'm not one of them.
Campbell Ritchie wrote:Please don't update an old post like that. Users will not notice the update after they have replied. I have reverted the edit. Please post a new post with the additional information.
Bear Bibeault wrote:No. Security concerns prevent the browser from having such access to the file system.
: Spring Boot :: (v2.3.3.RELEASE)
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not find com.github.KenobySky:webp-io:master.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/github/KenobySky/webp-io/master/webp-io-master.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
project :
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Tim Holloway wrote:Tone down the boldface a little. It makes it look like you are shouting. Your spacing is all that's needed to make your points visible.
You forgot a very common solution, which is to upload the images to an ordinary image file directory. So there's a third solution.
Although I should caution you that if you do that, don't upload into a directory within your WAR or your webapp server. That can fail or cause data to get lost when you update the WAR. Always upload to an external data directory. In Unix/Linux, the /var/lib directories are commonly used for purposes like that. For maximum flexibility, however, don't hard-code the upload directory path into the webapp logic. Put it in a webapp environment object so that you can set it when the app is deployed and the app can read it using JNDI.
As for S3, that's fine if you want to store images in the cloud. I'd say that storing images as BLOBs in a database would be last choice.