JHipster offers the possibility to use the type ImageBlob and AnyBlob in creating entities that have a property that is an image or any type of file respectively. With this option, the files are saved in database, but I would like to know if JHipster offers the ability to save files in the file system.
No JHipster does not offer this feature, it's up you to code it. There are plenty of examples on the web.
Here is one: Spring MVC save uploaded MultipartFile to specific folder
Related
Ive been using this guide here https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-storage
The examples here work nicely. But i want to know how i can use this setup to do other stuff. The example to read a file is only hardcoded to one file. The other example is to write to the same file.
I need some docs/examples on listing the blobs. And then dynamically reading whichever i want.
So, I have to make a package using the package manager of CRXDE. I need to add hundreds of paths to the filter by copying each of them one by one and it takes a lot of time by doing so. Is there any way I can upload a data file such as excel or CSV where the file contains all the paths and I can just build a package with it?
If the paths are query-able via AEM, you may try using the Query Packager tool from ACS AEM Commons.
Alternatively, you can write code to read through the CSV file and create the package programmatically.
Similar tools have already been created by a few people which you can leverage (see below) or build your own
Create Package in AEM from Excel File
Selective content packaging
Is it possible to upload jar as a file into database ? I need to upload jars into mongodb. I don't know how to do that. I know about file upload with Spring Boot.
I know it is possible to upload zip in database. But not finding information about JAR/WAR files.
JAR and WAR files are nothing more than a renamed ZIP file. If you want to see it yourself rename something.jar to something.zip and open it using archive manager.
Since you said you know how to upload a ZIP you should follow the same procedure. If the file is small (e.g. less than 4MB) perhaps using BSON is the best approach. See Storing Large Objects and Files in MongoDB.
If you mean saving a jar file into a database - it is depends on the database's support of BLOB data types.
And if you mean use Java language based stored procedures from JAR file - with Oracle and PostgreSQL this is possible. MongoDB supports server side JavaScript stored procedures only.
I know that I can use a BLOB or an XML file, but I was wondering if there was a better way to do this, or if either of these are the correct way of doing this. The user should be able to edit their file online and then save it onto the server, and at any time get the file back into the editor and continue editing that file (similar to that of Google Drive). Any ideas? We are using Spring Framework and controllers for our site. We are using a MongoDB for file storage (files are stored on the server, file paths are stored on the MongoDB).
According to current requirement,user will upload files with large size,which he may like to download later. I cannot store the uploaded files in DB because the size of files is large and performance will be impacted if I store uploaded files in DB.
Any one knows any java plugin which provide efficient file management on webserver and maintains the link to file so that the file can be downloaded when the link is requested. Also the code will make sure that user will be able to download only those files which is uploaded by them,they cannot download any file just by modifying the download link etc. I am using spring3 as the framework.
Please suggest how to solve this problem?
if you have write access to the file system why not just save them there ?
you then generate an unique ID and save the hash/file relation in db, you then need to supply the ID to get the file feed from a servlet
Store the file content on a part of filesystem out of web application so you cannot reach it changing the link.
Then you can store on db the path for that file, and return them only if the user has the permissions to read it.
Pay attention, do not store all the file on the same folder, or the number of files could grow too much. So find a way to store them with more folder levels.