how to find direct link of PDF file called through XHR - pdf

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

Related

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

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.

click pdf link in web, how to preview instead of download?

I have my resume linked in my home page.
But I found when I host the pdf file on two different storage server, the default behavior when click on the link differs: one directly download the pdf file bug the other preview in a new tab.
the two links are as below:
http://data-10045577.file.myqcloud.com/doc/Zhao.Kai_ShanghaiUniv.pdf
http://7xocv2.dl1.z0.glb.clouddn.com/doc/Zhao.Kai_ShanghaiUniv.pdf
I have tested on firefox chrome IE that this is not a browser issue.
For some price issue I have to switch to the storage server of which the default behavior is downloading pdf file.
what settings should I have so that click the pdf link then preview instead of downlod?
Additionally, the storage server provide a configure option that can set the "http header", I know little about the web, so can setting a header work, if so, how to ?
I googled it and it seems the content-disposition argument in http header account for this. But I add content-disposition='inline', doesn't help.
if not the browser's issue, then the download one is added programmatically with headers, and the preview one is just putting your file in that folder on the server

how to implement pdf.js to view pdf files in the pdf viewer?

i want to open pdf files that are linked to in a document in a new page in the pdf.js viewer.
i have downloaded the zip file from github:
https://github.com/mozilla/pdf.js
and gone to both of the index.html files in the examples folder.
i get blank pages when opening either of these files.
can anyone please tell me how to implement pdf.js so that i can open pdf documents in a new page in the pdf viewer?
thank you.
Try using '?file=url' in query-string with viewer.html.
For example: www.example.com/pdf-js/web/viewer.html?File="URL"
Source: pdf-js on github
And yes, you will most definitely have cross-domain issues if not using any web-server, as mentioned by #Silent.
Cheers.
Let me guess that you tried to directly open the examples via chrome. Your url probably starts off with file:///. This is causing a cross origin request error to occur on your browser. To properly view the examples, you need a LAMP stack.

download pdf file in blackberry in my applicaiton?

I am working on a sample BB application for downloading task.
I have internet connection setting in my app. Now my task "on click of a button, i want to download a PDF file in my device as a normal file download from a link"
I have searched alot regarding this query but didn't get anything.
As the code very long to provide here, please take a look at this url and invoke the blackberry browser with your pdf url.

AWS s3 file downloads are not working in Chrome (Works fine with IE, Mozilla, Safari)

I am using s3 to store my pdf files. But when i tries to download the files from s3 using chrome browser it doesn't do anything. It just refresh the page, no error, nothing ...
But from other browsers i can download that file.
When i checked in the console it gives 'Resource interpreted as Other but transferred with MIME type undefined.'
I got one thread from AWS https://forums.aws.amazon.com/thread.jspa?threadID=79493
But we can not tell user that go & disable this plugin & then download.
Is it a problem from AWS end?
I searched a lot but didn't get any solution.
Please help me to resolve this issue.
Thanks,
Vijay
I had this problem too. The solution it to force Chrome to download the PDF file instead of trying to open it in its reader.
In your GET request, append response-content-disposition=attachment. Refer to the S3 documentation on how to do this.
More details available here.