Upload videos to twitter from url in node - node.js

In my app I want to post a video to multiple networks (fb, twitter...), i'm uploading video to cloudinary and it sends back url, which I use to post to fb.
For twitter, there is no way to post a video with the url. Is there any alternatives to do this?
My server size is pretty low, like 1-2GB, so I can't download a video to my server and then create a stream to upload to twitter. I worry that if 3-4 users started to upload then my server will crash with out of memory.
Any suggestions using twit package or Simple HTTP Requests are welcome. Thanks

I had found an interesting article on how to upload your files to third party. Streaming File Uploads to Storage Server with Node.js
So you can update the code from the example with your twitter upload code.

Related

how to host mp3 file with koa framework

I'm coding API server to be used in mp3 app.
I've used koa-send, koa-static, and just setting mp3 file to response-body.
But, no matter what API the app uses, the app stops. When I sent the length of the MP3 file separately because the app did not seem to accept the length of the MP3 file, it worked on iOS but not on Android.
If I post the same MP3 file on S3 and send request to that URL, it worked well, so I can't understand what the problem is.
Also, if I play music on Safari using my API, it comes out as a live broadcast. (using other sites, it comes in the form of mp3)
If it's a problem that you don't know how long it's playing, why is it the same file, but not on other sites, and not on my API?
Other storage site:
My API:

using backend files nodejs

Sorry, It might be very novice problem but I am new to node and web apps and just have been stuck on this for couples of days.
I have been working with a API called "Face++" that requires user to upload images to detect faces. So basically users needed to upload images to my webapps backend and my backend would do an API request with that image. I somehow managed to upload the files at my node's backend using tutorial provided below but now I am struggling how to use those image files. I really don't know how to have access to those files. I thought writing just the filepath/filename would help but it did not. I am really new at webapps.
I used tutorial from here: https://coligo.io/building-ajax-file-uploader-with-node/
to upload my files at back-end.
thanks
You can also use the Face++ REST API node client
https://www.npmjs.com/package/faceppsdk
As per in documentation it requires a live URL on web. Then you have to upload your files into remote location (You may upload files to a Amazon S3 Bucket)
And also you check the sample codes from Documentation where you can upload directly to Face++

Angular2 ExpressJs - audio mp3 upload to the server (audio mp3 less than 16MB)

I'm about to start a project that will involve the user uploading audioMP3 files less than 16MB, which is less than the maximum file size for mongoDB. I have been searching but with no luck on how to implement this in the server side to recieve the mp3 file, save it to the DB and retrieve in the client. Any one done something similar or got any idea how to implement this specially the node express side.
Yes Thank you, what I finally did was to load the files in AWS and store their url MongoDB, later requested for them in my application and load them in the browser

How to send or stream base64 images with AJAX to Node.js Express server?

I am new to working with images in web development. We have a Node.js Express server that will run on Heroku and uses Cloudinary to store images.
Ideally we could save images directly to Cloudinary, but I am not sure if that's possible and we are afraid of putting our Cloudinary credentials on the client.
Assuming we must send images data to our server first instead of sending them directly to Cloudinary - if the images are encoded as base64 on the client, is it possible to stream the images from the client to the server - or must we send all the data at once? Either way, what headers do we use to send binary / base64 data?
is it possible to send or even stream binary data from the client to the server?
since it is a Node.js server, it would be ideal to use streams and to stream the file from our server to Cloudinary.
hope this makes sense, and info would be very helpful.
Why not using direct uploads from the client side to Cloudinary using the jQuery plugin?
This method supports both signed or unsigned uploads, when the signature can (and should) be generated on your server before rendering the page, for privacy reasons. Uploading from Base64 URI is also possible with this mechanism.
Note that Cloudinary's client-libraries also wrap this plugin and provide you with "off the shelf" solutions for embedding the upload-fields in your web app, with the signature already inside.
Let us know if you need any further guidance.

Checking the progress of a video uploading to YouTube - Unpublished Videos

Is there a url I can go to to check the status of video I am uploading to YouTube via the API?
I went to this page
https://developers.google.com/youtube/2.0/developers_guide_protocol_checking_video_status
which told me to go to this URL
https://gdata.youtube.com/feeds/api/users//uploads
But all I got back is an RSS feed of videos that are already uploaded (Published).
I am looking for unpublished videos and the associated progress.
I am using resumable upload so I am think if 10% of the video got uploaded I should be able to see that somewhere?
In Java sample you can request progress status via MediaHttpUploader.getProgress() or MediaHttpUploader.getNumBytesUploaded() "https://code.google.com/p/youtube-api-samples/source/browse/samples/java/youtube-cmdline-uploadvideo-sample/src/main/java/com/google/api/services/samples/youtube/cmdline/youtube_cmdline_uploadvideo_sample/UploadVideo.java#213"
C# would be really similar.

Resources