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

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.

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?

MERN App - Recommended ways to upload, store, and retrieve images?

I have an app using MERN stack. What i want to do is to allow the user to upload images from their local machine, save that image, and display it on the website. What would be the recommended way to do this? It seems as if GridFS and MongoDB is an option but from what I am reading, storing images files directly in a database isn't recommended
Storing images directly to DB is not recommended. Instead, you can use some third party libraries like multer that store images in the folder and generate a path for you to access that image which you can save in db.
Another approach is to use third-party services like Cloudinary or S3 bucket to save images and they will in return give you the URLs and you can save those Urls in DB.

Saving images in Azure storage

I am building a web application , where users can upload images & videos and store them in their account. I want to store these files somewhere and save only the URL in the DB.
What is the right way to do it using Azure services? Is there a dedicated server for this, or some VM?
Yes, there is a dedicated service for this purpose. It is the Azure Blob Storage. And you are highly advised to save all and any user uploaded content to that service instead to the local file system.
The provided link has samples for almost any language that has client SDK provided by microsoft.
If, at the end you use some platform or language that is not directly supported by an SDK, you can always refer to the Blob Storage REST API documentation.
You will need to go through the blob service concepts to get deeper understanding of the service and how to use it.

Backup Firebase data on persistent file storage on Cordova/PhoneGap

I looking for ideas how to implement a local backup of Firebase data on an users device for Cordova/PhoneGap apps.
So if an app is shut down, updated etc. the data can be booted from there.
There is one approach using local storage:
https://github.com/yeldarby/offline-firebase
However I prefer not to override Firebase code,
and to save data more persistently. Either written to a file via the Cordova file api, or via the SQLite Database plugin for Cordova/PhoneGap.
What is the best way to listen to changes on the Firebase data via AngularFire?
So I could react on it an save it along with the Firebase object keys etc.
And, Is there even a way to physically save pending local events?
Related:
Firebase offline storage with Phonegap

Resources