What is the best way to store data from my repository? - database

I'm building a website with a "repository" where the user can download and upload several files of different sizes. My idea is to use my database with metadata to store information (extension, some tags and the path where it is stored). And then the user can access this data or search the application. My problem is that I don't know the best way to store it, I thought of using google drive, S3 and dropbox through API's. But I would like to know other ways to make this possible. I know it's a complex subject, but I would like you to tell me where to study.

for storing metadata you can use mongodb sync with file id and for storing large file you can use google drive API (let me know if you intrested ) or some kind of file hosting.

Related

What are my options for private image hosting for a private website <100 users

I have created an operations journal website where users can write and read what happened during their shifts and report (on-going) incidents. I was looking to expand the solution by letting the users attatch images as well. The images should not be hosted publicly, so what are the common options?
Technologies that I've used to build the app are primarily: React, NextJS, Next-auth, MongoDB, and it's all hosted on Azure.
Should I just host the images with MongoDB?
Is it possible to use say OneDrive or Workplace, which we already pay for, for image hosting?
Or is there some other practice that is highly recommended?
The natural storage option for things like images (or any other kind of media files) is Azure Blob Storage. Cost effective and well suited for what you usually want to do with them. Putting binary data into any kind of database is usually a waste of resources.
Using Azure Blobs to Store the Images as blobs is the standard
if you don't want the Images to be available publicly then use a shared access signature (SAS),
https://learn.microsoft.com/en-us/azure/storage/blobs/sas-service-create?tabs=dotnet
But from the Stack you are using Mongodb can be sufficent create a seperate Collection and save the blobs there bcos
blob storage is a Nosql db. are you using azure's NoSql db Cosmosdb ? or mongodb itself.
Do you want to trigger code using events from the db?. such as after the image is uploaded do xxxx automatically.

How to store the files uploaded from a website or a html?

Now I am creating a real digital library website. The website is required to store uploaded file in a database and receive it from the database. I have found a way to store the uploaded files in Google Cloud. May I know is there another way better than this?

Is there a possibility to save an mp3 file on the firebase realtime database in React Native?

I need to save sounds which my rn app is using on a database. I'm not really familiar with databases, so I chose the most easiest variant as I'm thinking - firebase. So, is there a possibility to save an mp3 file on this db using react native? If not, what db supports this feature?
What you usually do in such cases is to store the actual file on a cloud storage service, such as AWS S3, while in your actual database you save the path to that file.
When you need to retrieve the file, you load the path from the database and with that information you can download the file from the storage.
If you want to remain in the firebase eecosystem, you should take a look at the cloud storage service for Firebase: https://firebase.google.com/docs/storage
You better store the files inside a storage like Google storage for firebase
or AWS simple storage or any other storage.
And store the url of the file inside your database.

Trying to upload a file into google app engine using Blob

I am trying to upload the file into google app engine from where I would like to retrieve it and then perform conversion into a pdf file. I want to have a cloud access so I am deploying this project. But I dont the best way to go about it. Can anyone help please ? Or is there any solution to directly convert the file while being on the server ?
I don't think there are any ways to convert a file directly on the server. But to store and retrieve, you might want to take a look into the Google Cloud Storage client library (and the one from Python, if needed).
These might help as well (Java and Python). From there you can easily save a file, then retrieve it. Once you retrieve it, do your conversion to pdf and voila!

Google Realtime API - creating and removing shortcut file in Google Drive

Looking at Realtime API quickstart example, a shortcut file is used to store realtime document model. I'm assuming that this is a file that holds realtime document model state.
Question: do I need to create and clean up this shortcut file for each collaboration session?
Note: Eventually I want to persist data to my database, not Google Drive.
From an API perspective, the realtime documents are designed to be persistent storage. The files are long lived, and there is there is no need to ever recreate them or store data elsewhere.
If you want to copy data elsewhere, how and when to do that sounds like a design decision you need to make given whatever makes sense for your app.

Resources