I have uploaded PDF/PST file in mongodb by mongofiles but by retrieving them in R(BSON) and converting it to "Character" type i didnt find the PDF/PST file,so is it possible to upload PDF file or PST file ? which file format doest mongodb support(other then CSV,TSV,TXT,audio) ? -Thanks
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
BSON has a Binary data type in which you can store anything you want. MongoDB sees it as a binary blob and does not care what type of data it is, so of course ot is possible to store PDF files. MongoDB documents are limited to 16 MB in size, so if you need to store large data, try GridFS.
I think you are confusing the ability to store files with the ability to translate between file types - your database is not going to change a PDF into a text file (or any other type of file), it will allow you to store a PDF file, as a binary blob, then retrieve that file later in exactly the same format (whether you store it directly or you use GridFS). For straight file storage, any file format is supported - and it can be any file type, format - it can even be invalid. It's just a bunch of binary data from the database perspective.
If you want to convert between types or examine files in general you need to use some sort of translation utility to do so - in your language of choice.