Is there a way to instead of re-downloading a file simply open the already downloaded file?
I frequently have to reopen files from a link, or find it somewhere on the downloads folder. It is not that important and far too many downloads to properly save and sort them for when I will or will not need later.
So is there a way to simply make firefox (or chrome) open the already downloaded file instead downloading it again ?
do you know?
how many words do you know
See also questions close to this topic
-
HTML5 video tag fails to display high resolution videos
I have a simple webpage with a
<video>
tag. I tried assigning thesrc
attribute of the video tag with URLs of two different videos, both about 2 and a half seconds long:The first video has a frame resolution of 3840x2160. JSFiddle: https://jsfiddle.net/u2sgawk7/2/
The second video has a frame resolution of 4096x2160. JSFiddle: https://jsfiddle.net/u2sgawk7/3/
I'm encountering a problem with the second video when loading the webpage from Google Chrome on my mobile device (Galaxy S10). The first JSFiddle works perfectly fine on all devices. The second JSFiddle seems to work fine on desktop browsers, but simply displays a blank white screen when I open it on my mobile device (on Google Chrome for example).
I've tested this functionality using many other video files, and it is clear that the frame resolution is the decisive factor here: the problem occurred with every single video with a resolution of 4096x2160, and only with these videos.
I tried using this website: https://clideo.com/crop-video, to test whether or not it is even possible to display high resolution videos on mobile. I uploaded the second video (the one that was causing a white screen), and it was successfully displayed using a video tag on that website - both on desktop and on mobile!
What am I doing wrong? Any help to resolve this would be appreciated.
Once again just to clarify:
The issue does not happen on desktop browsers at all.
The issue does not happen on FireFox on my Galaxy S10.
The issue happens on every other browser I tried on my Galaxy S10, as well as in Safari on iPhone.
-
It won't let me run selenium code in IntellJ all of a sudden
I was going to execute my code, which is the one I always execute every day for my tests, but suddenly this error appears and I have hardly found a solution, I don't know if it is possible that you can help me with that, I attach the response from the console
Starting ChromeDriver 102.0.5005.27 (df4a85108ffad4dca2c409c52f24df7ec0204b91-refs/branch-heads/5005_22@{#4}) on port 33567 Only local connections are allowed. Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. ChromeDriver was started successfully. Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 102 Current browser version is 101.0.4951.54 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'DESKTOP-V4H61F7', ip: '192.168.56.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.2' Driver info: driver.version: ChromeDriver remote stacktrace: Backtrace: Ordinal0 [0x003B2733+2434867] Ordinal0 [0x003407A1+1968033] Ordinal0 [0x0022C678+837240] Ordinal0 [0x0024CAC3+969411] Ordinal0 [0x002486DA+952026] Ordinal0 [0x00245F91+941969] Ordinal0 [0x002790B0+1151152] Ordinal0 [0x00278D0A+1150218] Ordinal0 [0x00274256+1131094] Ordinal0 [0x0024E840+976960] Ordinal0 [0x0024F736+980790] GetHandleVerifier [0x00623C72+2515426] GetHandleVerifier [0x0061702F+2463135] GetHandleVerifier [0x0045522A+620442] GetHandleVerifier [0x00454016+615814] Ordinal0 [0x0034707B+1994875] Ordinal0 [0x0034B938+2013496] Ordinal0 [0x0034BA25+2013733] Ordinal0 [0x00354DE1+2051553] BaseThreadInitThunk [0x7632FA29+25] RtlGetAppContainerNamedObjectPath [0x77E87A7E+286] RtlGetAppContainerNamedObjectPath [0x77E87A4E+238] at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62) at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30) at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:1002) at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:74) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131) at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:181) at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:168) at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:123) at Selenium.pruebas_activity21.main(CrearOT.java:28) Process finished with exit code 1
I hope you can help me with it. It doesn't say any relevant changes, but it seems that any code I'm trying to do can no longer be executed.
-
PHP / JS - Firefox Cookies Expires not set
This is the way how I set cookies in JavaScript:
function setCookie(cname, cvalue) { expires = "expires=2147483647"; document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"+";" +";samesite=None" + ";secure=true"; }
This is the way how I set cookies in PHP:
function setMyCookie($name, $value) { $t = 2147483647; setcookie($name, $value, [ 'expires' => $t, 'path' => '/', 'samesite' => 'None', 'secure' => true ]); }
Works on Chrome: Expires / Max age is set correctly.
Does NOT Works on Firefox: Expires / Max age is set NOT correctly. When I close the browser (=session is done), the cookies are deleted.
How can I set cookies also in Firefox properly?
Thanks, BlueMatrix
-
How do I stop the web browser from resizing my images?
I want my images to be displayed as clear as they are displayed on my OS. What i discovered is that it doesn't matter if I specify in the html image tag the original size of the image, Firefox and Chromium will display it bigger and because of this blurrier.
Here's what is happening:
The image of the left is the image displayed on the web browser. As you can see with the pixel screen ruler it's width is 200px. The image on the right is my original image viewed with my OS image viewer at 100% size. Yo can see in the properties that the image is 200px by 200px. The thing is that I had to specify a smaller image size in the HTML in order for the browser to show it as it's original size so that it renders with no blur. You can see that my html specifies 142px width and height.
I think this browser behavior is totally wrong and it should not work like this but I don't expect this to change which is sad. So, how do you deal with this situation? Is there a way to write something in the HTML (like in the header) to make the browser render images at 100% size? How?
This is my "200px" image displayed on the browser in 280 pixels:
-
How do I fix pyqt web browser not loading pages
I am trying to make a web browser using pyqt, but every time I click a url it just does not do anything, that or it crashes. For example if I try to open wikipedia or anything like that it simply refuses to load, and if I Dare to click more than once it crashes. This is the code:
import sys from PyQt5 import QtCore from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtWebEngineWidgets import * from PyQt5.QtCore import * import urllib.request class Window(QMainWindow): def __init__(self): super(Window,self).__init__() self.setAttribute(Qt.WA_TranslucentBackground, True) self.browser = QWebEngineView() self.browser.setUrl(QUrl('https://sites.google.com/view/yevnilc-search/home')) self.setCentralWidget(self.browser) self.showMaximized() navbar = QToolBar() self.addToolBar(navbar) prevBtn = QAction('Prev',self) prevBtn.triggered.connect(self.browser.back) navbar.addAction(prevBtn) nextBtn = QAction('Next',self) nextBtn.triggered.connect(self.browser.forward) navbar.addAction(nextBtn) refreshBtn = QAction('Refresh',self) refreshBtn.triggered.connect(self.browser.reload) navbar.addAction(refreshBtn) homeBtn = QAction('Home',self) homeBtn.triggered.connect(self.home) navbar.addAction(homeBtn) self.searchBar = QLineEdit() self.searchBar.returnPressed.connect(self.loadUrl) navbar.addWidget(self.searchBar) self.browser.urlChanged.connect(self.updateUrl) def home(self): self.browser.setUrl(QUrl('https://sites.google.com/view/yevnilc-search/home')) def loadUrl(self): global x x = str(url = self.searchBar.text()) self.browser.setUrl(QUrl(url)) def updateUrl(self, url): self.searchBar.setText(url.toString()) MyApp = QApplication(sys.argv) QApplication.setApplicationName('Yevnilc Sail') window = Window() MyApp.exec_()
Is there a way to fix it
-
Posts text and image to pdf in react
I'm trying to create a blog post website where anyone can post anything. And also any user can download any post in one click. So is it possible to implement a button for download whole specific post content except side menus and comment in react.
-
Django download links only working in new tab
This is driving me crazy, I'm developing a django app and need to provide a download link to a file located in the media folder. If I type the url in a blank tab it works fine, the file is downloaded, but if I click on the link from the website nothing happens. I realize this might be because the url to the file doesn't have the same origin that the website and from what I understood the browser won't allow the download, is this correct? Is there any way around?
url of the website (in development): http://localhost:8000/django_app/view_name url of the file: http://localhost:8000/django_app/media/file.ext
I've tried the following html href:
href="../media/file.ext" download target="_blank"
And the following view:
def download_file(request): fl_path = settings.MEDIA_ROOT + "\\filename.ext" filename = "file_name" mime_type, _ = mimetypes.guess_type(fl_path) response = HttpResponse(fl, content_type=mime_type) response['Content-Disposition'] = "attachment; filename=%s" % filename return response
Nothing happens when I click on the link, no error generated. If I open the link in a new tab it downloads the file normally... Note that I need to be able to change the href link dynamically. Thanks!