where to store photos, in database or in api - node.js

I'm currently working on creating a website for my college. I want to include a galary section on the page.
so through admin page, authorities can upload photos of special college events. Now my question is where to store those images. I have two options 1)storing in the Database using gridfs 2) storing in the api. I have done a lot of research on this topic but everyone saying it depends on the situation. What do you think the best option for this situation. I'm still new to server side programming, so please help me. I'm using nodejs with ejs and mongodb

Related

How to create file upload form in Bigcommerce checkout page and link it to order ID?

I have gone through Bigcommerce documentation and also the tutorial videos on their official Youtube channel, there they taught about editing theme files, however my requirement is to let the users upload a file, save its path into BigCommerce database and access the file path and display it with order ID on Orders page after users have checked out.
I don't find their documentation on connecting to and accessing database.
Is there a place where articles on interacting with Bigcommerce database are available?
BigCommerce doesn't provide any native database access, but you can use BigCommerce API to access data if you needed to do so. Per reading your question, I believe you may be able to use webdav to upload your file and link it to specific pages, if that's more of what you're looking to do.
--Update--
We do currently have an idea in the community for this to be supported natively. You can comment and vote for it to show support and to raise the awareness to our engineering teams. Find it here!
I know this isn't a solution for right now, but your support would help this idea become natively supported. We do have the ability to upload files on the product level, like this.

Storing images on server

I am new to backend programming. I am working on a personal Full stack project where I display all my art works. These art works are lot of images. I read up in some articles that it is better to save files on server than on database. I am using MEAN stack for my application. Can anyone refer me to some links or help me understand how can I achieve storing images on server?
If you are using node.js I recommend using multer for uploading your files through it to server and then make a public link to your file and store that link in your database.

Does someone know of 'iPaper-secure'-like service?

I've been using Scribd secure and their javascript/PHP api for few years. I've made a custom upload page where I upload books and automatically disable printing/downloading/copying, because this is what my client wants. Those books are then embedded into a page on my site.
I was never really satisfied with Scribd API and their 'iPaper secure' because it is not really secure but I wasn't able to find better solution for displaying documents to registered members while restricting save/copy/print. And Scribd developer support was very bad. But I lived with that.
Unfortunately, I just noticed that printing is no longer disabled on my 'secured' documents, because Scribd removed this option almost 3 years ago, without my knowledge :)
Please, does anybody know of any way for me to host books 'securely'?
Thanx in advance!
There are several PDF to html converters which would allow you to put the content on your site (with full control) or you could use something like PDF.js to display files.

Any libraries that can make accessing Google APIs as a service account simpler for NodeJS?

Background: My idea is to create a primarily content-heavy website (think news articles or blog posts) written entirely in nodejs. Since creating content on Google Drive (Google Docs) in particular is very simple, what I would like to do is have Nodejs retrieve the website's content from Google Docs.
Challenge: As far as I can tell, the correct way to do this according to Google is to create a Service Account so that the application can access the files stored on Google Drive without requiring user-intervention in the form of a confirmation. Google provides three libraries--java, python, and php--for server-to-server requests. Does anyone know of anything similar already written by the Node community? I am aware of node-oauth but I've searched through it's source and haven't found anything referencing private keys, which are required for server-to-server interaction, which I'm taking to mean it's not supported. Writing one is also an option, but I'd like to avoid that if at all possible. Looking at the Google-written Java Oauth2 client library makes it pretty clear that it's not an easy task.
Thanks in advance!
This is one library I've found that looks pretty thorough and complete for creating JSON Web Tokens: JWCrypto
I know this thread is old, but in the event others arrive here looking for an answer:
Google is working on an official module to access all of their API's. Its alpha so be careful but it looks very nice- github repository

User editable template/view - Node.js, Mongodb

Has anyone here an experience with writting an application, where the user is allowed to edit a template of his "profile" online? I mean custom css, html and js - like Tumblr allows that.
What is the best and secure way to do that? Is it better to store the template in a database or in a file?
I am trying to implement this feature with node.js and mongodb, but your experience from other frameworks/languages are welcome too!

Resources