Amazon S3 upload using rest API and node.js [closed] - node.js

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
guys, I want to upload image to S3 storage, but I can't do it.
My app is on parse.com and I can't use npm to install aws-sdk
Please, help me, I'm newbie in aws and node.js.

I posted a link as a comment, however I will give it a bit of explanation.
I am not sure if it is possible to upload to S3 through Parse (mainly because that would be alot of unnecessary traffic for Parse), however it is possible to upload to S3 directly from your client by using a certificate. This (signed) certificate effectively tells S3 that you are authorizing the device to upload to your bucket as long as the requirements included in the certificate are met.
This question on Parse's site give more information about this, as well as Cloud Code that should generate the certificate for you. As always, I would recommend you understand what this code is doing before you use it for any production app/service.
You can also probably find some more information about this client-side upload by doing a quick google for something like 'client side upload to S3'.

Seems like a perfect place to use https://www.inkfilepicker.com
Just plug in your own S3 creeds and off you go.
If you can't stand not doing something painful use the REST API here for S3 http://docs.aws.amazon.com/AmazonS3/latest/dev/S3_Authentication2.html and build out your cloud code functions with the networking capability available in parse
There is a reason inkfilepicker exists tho...

Related

How do cloud storage companies check for malicious content? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I was wondering that how do storage solutions like S3 or Google Drive check whether their storage platform is being abused for the storage of malicious content?
e.g. if someone uploads a password protected zip file to their servers, I don't see a way on how they can verify it.
For unencrypted files, I can understand some sort of file parser could work. But if someone uploads a password protected file, the only way to see/verify the contents is try to brute force your way into it (ignoring the moral obligations for the organisation to not do that).
So, how do these companies/solutions verify the kind of data that is being uploaded on their platforms?
There isn't technical solution, but on legal solution. They say: "We are only a service provider, not a content provider. We aren't responsible of the illegal use of our services".
This stand has been the same with Youtube, where you was able to upload content with copyright without issue with Google (but with the owner of the copyright). Now, it has changed and Youtube performed check, but it was the same legal principle.

How to start building a cross platform app? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
My friend and I are working on creating a product from scratch. We aim to build a cross platform application using react-native. We've planned to use firebase as our server hosting application.
Although, we both have fair amount of knowledge in react and have gone through some videos on react-native and firebase, mobile app development from scratch is still pretty new to us. We're having trouble to answer the following questions:
Where to start developement ?
Should we write our server in nodeJS and deploy it on firebase and my app can call the endpoints or should we connect to firebase directly from client side ?
How to setup configuration files and different environments for developement ?
These are among the many questions we have and we feel lost in this sea of infinite information.
Could anyone guide us here ? Please help me if I can frame my question in a better way.
React Native is a great place to start. With today's ecosystem lead by flutter and react, Angular has unfortunately fallen behind.
Both, Cloud functions are Firebase's solution to server instances, these create short-lived functions that do complex or secure tasks such as handle payments, delete/manage users, etc. While the bulk of your app and its logic with firebase should be handled on the client, including accessing the data so long as you have secure rules.
this depends entirely on your framework of choice but in general, there should be a build option that enables you to configure which settings to compile with.

Upload video to youtube from Firebase Storage using cloud function [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
Can I upload video to my youtube channel from firebase storage using cloud function. There is no restriction on the function triggering which means the function can be triggered by any method like HTTP trigger/cron job/Firebase Call function. I did not find any code related to this yet.Thanks .
I'm not very familiar with YouTube API, however I checked it shortly and I think it will be hard or even impossible to do it as general with no limits. When I looked on Firebase Quotas page there is a quota that might limit such idea.
Cloud Function is has hard time limit of 540 seconds. I think that might be some movies that you are able to download within 9 minutes, however for sure most of youtube contents will not be possible to be uploaded in such time.
Other problem is that I do not found any possibility to upload without local file system. Firebase function does not use local file system only has possibility to use in memory tmp directory, which means that it's affecting total memory usage which is limited by quota of 4GB. Not much for video purposes as well.
So in my opinion, it maybe possible to upload small video using cloud function, but I don't think you will be able to upload larger content.

Do I need a backend for a firebase web app? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am curious with all the features of firebase, cloud functions, and client-side authentication, Firestore, etc. options, does it make sense to even use a 'backend' with a firebase web app? The reason I am asking is that I started a project with a react app and a node.js backend rest API service. I started to realize that with all of firebases features, it might make sense to scratch my backend entirely. What are everyone's thoughts? Thanks
You can use firebase directly without a backend (if it is just a simple project) but i'd recommend you to use it with a backend to be more secure, since the backend lets you check the recieved data if it is fake or not correct, also in order to hide your firebase's api key and other stuff like that, i have a firebase app on github (with front-end of react and backend of nodejs+firebase) i can leave the link of the repo if you are interested to check it out, thanks
Firebase is definitely a very good option for you. Since you are adept at using Javascript, you can use the Firebase JavaScript SDK and your backend is up and running
Google’s Firebase offers the following:
A very robust authentication service(Currently supports Google, Facebook, Twitter, Github, Email/Password and Anonymous authentication).
Realtime Database
Storage
Hosting
Cloud Messaging
Notifications
Analytics
Hope this help...

Upload and fetch PDF from firebase using Nodejs [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I want to create a website for a library using Nodejs and firebase.
The idea is to show resources based on certain topics in pdf to users.
Can we create folders for different topics and fetch to website accordingly?
Is this possible?
You can use Cloud Storage to store the PDF files. To download a file from storage, you need to know its path. You can use Realtime Database or Firestore to store the file paths, along with all other info that you will need in order to display a folder-like structure based on topics, tags, or whatever you need in the website.
In Firebase Hosting you can only serve static content, so you can't host node.js apps directly. However, you can use Cloud Functions to serve your dynamic content. You can read the database in Cloud Function using the Admin SDK and serve ready-to-show content, or let the clients use the Web SDK to read the database and generate the views client-side.

Resources