I am currently doing a sound recording using JavaScript and I have a BLOB URL data as an output.
Is there anywhere that I can send this data and save it in Database through java using Input Stream?
Sample of BLOB URL DATA which was generated after recoding the audio:
blob:http://127.0.0.1:8888/363f3a17-81d0-4f4d-915c-8d01d288b8bc
Related
I have a problem displaying a pdf file. I am sending an api query to a server that stores pdfs in base64. After receiving a response from the server, I get data like this:
It looks like the pdf has been converted to a string. In react js having such data, is it possible to display the pdf for the user?
I am trying to write an email client that reads email files that have been sent to an S3 bucket via AWS SES and displays those email files in a browser like other email clients do. One of the tasks that I am grappling with is how to display the attachments which I get in the form of a buffer. For example, for a pdf attachment, I get a data buffer of contentType "application/pdf". Is there a way to embed this data stream into a HTML field such that it shows up as a properly formatted pdf document?
here is screen shot of what I have at the client page level:
i basically need to save a blob on a mongo database, on my back end i use node express / moongose as orm , im sending a audio blob to my back end i dont know what would be the best aproach to save this audio on my db, retrive later on my front end and play, i heard about grindfs, but that should only be used for files bigger than 16 mb and this blob come from a 00:30 sec audio record.
thanks in advance guys... sorry for my english in advance...
the schema where i need to save the blob on my back end
blob coming from my back end
i tried to generate a base64 string of that blob, but this return a huge string, and i dont think that is very performative just trhow that string on my database
i just need to save the audio as a blob on my db, retrieve on my front end and play the same audio
I know that blob is a data type for binary data as integer is a datatype for int. As they say, It's used to store files directly in database (we move our audio file into blob, and save that blob in database).
Question 1) why to store blob for audio if I can just put the audio in storage for example path /var/www/audio.mp3 and in database I store path_name /var/www/audio.mp3?
Question 2) which is better ? how netflix stores movies? just blobs or what?
Question 3) Curious if there're any cons or prons if you could just give me ideas so that I know when to use them .
Putting the blob in the database, rather than a file, allows you to grow to multiple servers with load balancing. If you put the data in files, you would have to replicate the files between the server. Most databases have built-in replication features, this isn't as easy for regular files.
Better to use external storage/cdn for serving such kind of large content.
How Netflix and our works? They upload content on external bucket i. e. S3 and write file name in db for identification. According to user file access frequency that file cache on CDN/edge location. User will get awesome experience while content server from their nearest edge location
With blob you can store all kinds of stuff.
Do you communicate with an API via SOAP or JSON and want to store it in the database? Use a blob. Want to log what a user filled into a form when it threw an exception? Store the entire post as a blob. You can save everything as is. It's handy for logging if you have different data formats. I know an API which expects some data via SOAP and some as JSON. To log the communication I use blob because the response may be in XML, JSON, a number (http code 203 for empty but accepted) or an exception as array.
I'm storing several mp3 files in MS SQL Server'08 as BLOB objects (I use filestream). There's a WCF service which can send one of this objects to html client.
Preliminarily I convert BLOB to byte[] using ToArray().
How to convert incoming byte[] array to audio(mp3) and play it?This's only javascript/html on client.
I use SoundManager2 http://www.schillmania.com/projects/soundmanager2/
to play audio.
Thanks!