Webtorrent - how to stream from a predefined URL of a .torrent file - webtorrent

I'm just wondering if it is possible to stream from a predefined URL of a .torrent file?
Am I not clear? Let me clarify. Please see this- http://medhabi.com/torrent/
This is something I downloaded from the internet. As you see, it requires to upload a .torrent file and then streams the movie. But what I want is to preset a remote URL of a .torrent file. And I don't want any form to upload file.
Let's say, if a visitor opens this URL http://medhabi.com/torrent/, it'll start streaming from this .torrent file https://yts.ag/torrent/download/D066D4D0EBEFB95102BB44FECDEB5A5FD519E29F.torrent
How do I do that? I'm not good at JavaScript.
(I have added a JSFiddle link in the comment)

It won't work because most probably that torrent doesn't have nany WebRTC seeders (the ones that work in the browser)
Please don't use SO and WebTorrent for piracy.

Related

How to read files from anywhere with vue.js

I am trying to read files from my music directory on my PC.
I have tried doing it with the node.js file system module, but it is not working. How do I get it to work?😢
Just a late follow-up. It is possible to read and write files using HTML5 with the FileReader and saveAs(). The browser will open a file dialogue and let the user choose the file, so the user is aware of the file access. It is not possible to read or write to a file without the user's attention.
https://developer.mozilla.org/en-US/docs/Web/API/FileReader
As said by #flame in a comment, it's just impossible, because the browser never have access to the visitor's disk (do you imagine the security issue if it was the case ?).
Vue.js is a Front-end framework, so the application it produces only have access to what the browser has access to.

how to find direct link of PDF file called through XHR

Is it possible to retrieve download link of PDF files on any of following links?
I captured send/request data between browser and WiFi adapter, but I couldn't find anything helpful from the logs.
http://ce-lib.iust.ac.ir/ViewFile.aspx?id=8355
http://ce-lib.iust.ac.ir/ViewFile.aspx?id=8117
http://ce-lib.iust.ac.ir/ViewFile.aspx?id=8030
Thanks in advance

Uploading image file from VBA Excel

I know this question has been asked a lot of times already but unfortunately none of the answers have helped me. I want to upload an image file to my remote Web server (Apache). In my Excel cell, I have the file path of an image and want to use VBA to upload that file to a remote server.
I can't use any 3rd party tool in conjunction (like WinSCP), because that will make my product not very "portable-friendly". I was fine with Windows FTP, but it doesn't seems to be supporting passive mode and hence I also can't use that.
There are some threads which used IE to upload the file, and some which I believe are uploading via POST request by reading file in binary mode.
I want to replicate something similar to uploading files via HTTP POST on a website.

Show content of a zip file in a browser, rather than downloading it

I have a log server, where users upload archives and view their content online when needed. Currently the server unzips files, right after receiving them. Unfortunately, my peers consumed all the drive space I had. I can free up a lot of space, if there's a way of storing ZIP archives, but feeding them to users as HTML page (same as default Apache's file browser).
I know there are solutions relying on JS, like:
http://gildas-lormeau.github.io/zip.js/demos/demo2.html
https://stuk.github.io/jszip/
or I can unzip them on demand at server side and provide link to a temporary folder. However, some time ago I've heard a browser can view an archive content if proper headers are sent from Apache/nginx. Apache's mod-deflate doesn't help much here and I can't find other docs - perhaps it's not possible after all?
Cheers.

Permanent link to an audio file (googleDrive)

I'm developing a player for playing audio from the "cloud." Having question, if it is possible to obtain permanent link to an audio file to play without regular re-authorization (googleDrive)?
When you get the file list back from Google drive theres a field called AlternateLink this apears to have a link something like this:
https://docs.google.com/file/d/{SomehashStuff}/edit?usp=drivesdk
If I dump that link into a browser it opens the file for me. Now this will probably only work if you have access to that file and are loged into google at the time. So if you save that link my bet is that you will be able to use it later to open the file. But this will probably only work if you have access to the file and are loged into google with the browser you are using to open the link.