multer or GRIDFS for development [closed]












0














so i want to know which is better in every purpose, to store files (images in my case) in server with multer or store files (images) in database (mongodb (mongoose)) with GRIDFS.



which is more safe and why and which is more suitable for development



(with nodeJS)










share|improve this question















closed as primarily opinion-based by Yan Sklyarenko, Nate, AdrianHHH, Tomasz Mularczyk, arghtype Dec 27 '18 at 18:35


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.















  • Basically MULTER is used to store file in the server's file system and provides lots of functionality to work with file before uploading. On the other hand, GRIDFS is used to store file in mongodb database, which I think a bad practice. You can read the pros and cons of this two ways of storing [here][1] and [here][2]. [1]: softwareengineering.stackexchange.com/questions/150669/… [2]: habiletechnologies.com/blog/…
    – Muhaimenul Islam
    Dec 27 '18 at 16:40










  • i read both question and that blog too but as i admit i am using NoSQL (mongodb) and in case of mysql it has much easier way to do it with BLOB type (as i know because i was working SQL for some time) and also i am not using sync at all , i am using ajax in front and async functions in nodejs backend, so if you can explain here more deeply which is better, or maybe gridfs-multer-storage is what i need
    – codR
    Dec 27 '18 at 17:04










  • i think the best solution for this is to store url or filename of the image in database and when user queries the image u can response with that url or fn
    – codR
    Dec 27 '18 at 19:13










  • and store files in FS ofc
    – codR
    Dec 27 '18 at 19:13
















0














so i want to know which is better in every purpose, to store files (images in my case) in server with multer or store files (images) in database (mongodb (mongoose)) with GRIDFS.



which is more safe and why and which is more suitable for development



(with nodeJS)










share|improve this question















closed as primarily opinion-based by Yan Sklyarenko, Nate, AdrianHHH, Tomasz Mularczyk, arghtype Dec 27 '18 at 18:35


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.















  • Basically MULTER is used to store file in the server's file system and provides lots of functionality to work with file before uploading. On the other hand, GRIDFS is used to store file in mongodb database, which I think a bad practice. You can read the pros and cons of this two ways of storing [here][1] and [here][2]. [1]: softwareengineering.stackexchange.com/questions/150669/… [2]: habiletechnologies.com/blog/…
    – Muhaimenul Islam
    Dec 27 '18 at 16:40










  • i read both question and that blog too but as i admit i am using NoSQL (mongodb) and in case of mysql it has much easier way to do it with BLOB type (as i know because i was working SQL for some time) and also i am not using sync at all , i am using ajax in front and async functions in nodejs backend, so if you can explain here more deeply which is better, or maybe gridfs-multer-storage is what i need
    – codR
    Dec 27 '18 at 17:04










  • i think the best solution for this is to store url or filename of the image in database and when user queries the image u can response with that url or fn
    – codR
    Dec 27 '18 at 19:13










  • and store files in FS ofc
    – codR
    Dec 27 '18 at 19:13














0












0








0







so i want to know which is better in every purpose, to store files (images in my case) in server with multer or store files (images) in database (mongodb (mongoose)) with GRIDFS.



which is more safe and why and which is more suitable for development



(with nodeJS)










share|improve this question















so i want to know which is better in every purpose, to store files (images in my case) in server with multer or store files (images) in database (mongodb (mongoose)) with GRIDFS.



which is more safe and why and which is more suitable for development



(with nodeJS)







node.js mongoose multer gridfs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 27 '18 at 16:34

























asked Dec 27 '18 at 16:24









codR

517




517




closed as primarily opinion-based by Yan Sklyarenko, Nate, AdrianHHH, Tomasz Mularczyk, arghtype Dec 27 '18 at 18:35


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as primarily opinion-based by Yan Sklyarenko, Nate, AdrianHHH, Tomasz Mularczyk, arghtype Dec 27 '18 at 18:35


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.














  • Basically MULTER is used to store file in the server's file system and provides lots of functionality to work with file before uploading. On the other hand, GRIDFS is used to store file in mongodb database, which I think a bad practice. You can read the pros and cons of this two ways of storing [here][1] and [here][2]. [1]: softwareengineering.stackexchange.com/questions/150669/… [2]: habiletechnologies.com/blog/…
    – Muhaimenul Islam
    Dec 27 '18 at 16:40










  • i read both question and that blog too but as i admit i am using NoSQL (mongodb) and in case of mysql it has much easier way to do it with BLOB type (as i know because i was working SQL for some time) and also i am not using sync at all , i am using ajax in front and async functions in nodejs backend, so if you can explain here more deeply which is better, or maybe gridfs-multer-storage is what i need
    – codR
    Dec 27 '18 at 17:04










  • i think the best solution for this is to store url or filename of the image in database and when user queries the image u can response with that url or fn
    – codR
    Dec 27 '18 at 19:13










  • and store files in FS ofc
    – codR
    Dec 27 '18 at 19:13


















  • Basically MULTER is used to store file in the server's file system and provides lots of functionality to work with file before uploading. On the other hand, GRIDFS is used to store file in mongodb database, which I think a bad practice. You can read the pros and cons of this two ways of storing [here][1] and [here][2]. [1]: softwareengineering.stackexchange.com/questions/150669/… [2]: habiletechnologies.com/blog/…
    – Muhaimenul Islam
    Dec 27 '18 at 16:40










  • i read both question and that blog too but as i admit i am using NoSQL (mongodb) and in case of mysql it has much easier way to do it with BLOB type (as i know because i was working SQL for some time) and also i am not using sync at all , i am using ajax in front and async functions in nodejs backend, so if you can explain here more deeply which is better, or maybe gridfs-multer-storage is what i need
    – codR
    Dec 27 '18 at 17:04










  • i think the best solution for this is to store url or filename of the image in database and when user queries the image u can response with that url or fn
    – codR
    Dec 27 '18 at 19:13










  • and store files in FS ofc
    – codR
    Dec 27 '18 at 19:13
















Basically MULTER is used to store file in the server's file system and provides lots of functionality to work with file before uploading. On the other hand, GRIDFS is used to store file in mongodb database, which I think a bad practice. You can read the pros and cons of this two ways of storing [here][1] and [here][2]. [1]: softwareengineering.stackexchange.com/questions/150669/… [2]: habiletechnologies.com/blog/…
– Muhaimenul Islam
Dec 27 '18 at 16:40




Basically MULTER is used to store file in the server's file system and provides lots of functionality to work with file before uploading. On the other hand, GRIDFS is used to store file in mongodb database, which I think a bad practice. You can read the pros and cons of this two ways of storing [here][1] and [here][2]. [1]: softwareengineering.stackexchange.com/questions/150669/… [2]: habiletechnologies.com/blog/…
– Muhaimenul Islam
Dec 27 '18 at 16:40












i read both question and that blog too but as i admit i am using NoSQL (mongodb) and in case of mysql it has much easier way to do it with BLOB type (as i know because i was working SQL for some time) and also i am not using sync at all , i am using ajax in front and async functions in nodejs backend, so if you can explain here more deeply which is better, or maybe gridfs-multer-storage is what i need
– codR
Dec 27 '18 at 17:04




i read both question and that blog too but as i admit i am using NoSQL (mongodb) and in case of mysql it has much easier way to do it with BLOB type (as i know because i was working SQL for some time) and also i am not using sync at all , i am using ajax in front and async functions in nodejs backend, so if you can explain here more deeply which is better, or maybe gridfs-multer-storage is what i need
– codR
Dec 27 '18 at 17:04












i think the best solution for this is to store url or filename of the image in database and when user queries the image u can response with that url or fn
– codR
Dec 27 '18 at 19:13




i think the best solution for this is to store url or filename of the image in database and when user queries the image u can response with that url or fn
– codR
Dec 27 '18 at 19:13












and store files in FS ofc
– codR
Dec 27 '18 at 19:13




and store files in FS ofc
– codR
Dec 27 '18 at 19:13

















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas