Ask Your Question
3

What are the alternative methods for uploading and retrieving files in a Spring Boot application with MongoDB without relying on GridFSTemplate?

asked 2023-06-08 20:40:41 +0000

woof gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-06-08 21:07:02 +0000

bukephalos gravatar image

There are a few alternative methods for uploading and retrieving files in a Spring Boot application with MongoDB without relying on GridFSTemplate:

  1. Binary data: You can store your files as binary data in the database. However, this method is not recommended for larger files as it can cause performance issues.

  2. Use GridFS API: You can use the GridFS API directly instead of relying on GridFSTemplate. This can give you more control over the uploading and retrieving process.

  3. Store files in a file system: Instead of storing your files in the database, you can store them on the file system and use MongoDB to store metadata about the files such as name, size, and location.

  4. Use a third-party storage service: You can use a third-party storage service such as Amazon S3, Google Cloud Storage, or Azure Blob Storage to store your files and use MongoDB to store metadata about them. This approach can be more scalable and efficient for large files or heavy traffic.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-08 20:40:41 +0000

Seen: 12 times

Last updated: Jun 08 '23