Code Monkey home page Code Monkey logo

you-cant-download-this-image's Introduction

You can't download this image

Site status

Or can you? Visit https://youcantdownloadthisimage.com/ to give it a go!

Running your own server

If you'd just like to test the code that keeps the connection open, run the following

# Build and start serving lisa.jpg on http://localhost:3000/
make
./serve
Full setup

The following assumes that you have caddy installed with systemd.

cd /opt                                                                # Navigate to /opt
git clone https://github.com/radiantly/you-cant-download-this-image    # Clone repository
chown -R :caddy you-cant-download-this-image/                          # Set dir group to caddy
cd you-cant-download-this-image && make                                # Build

Start and enable the systemd unit file to keep it running:

ln -s /opt/you-cant-download-this-image/lisa.service /etc/systemd/system/lisa.service
systemctl daemon-reload    # Reload service files on disk
systemctl start lisa       # Start
systemctl enable lisa      # Autostart on boot

Configure caddy:

mv /etc/caddy/Caddyfile /etc/caddy/Caddyfile.bak    # backup existing Caddyfile
ln -s /opt/you-cant-download-this-image/Caddyfile /etc/caddy/Caddyfile
systemctl restart caddy

License

MIT

you-cant-download-this-image's People

Contributors

radiantly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

you-cant-download-this-image's Issues

Rename the file

The image will download the only issue is the server won't close the connection and keep sending data. Right Click > Save Image As save the image go to the save location there is a file called (lisa.jpg.crdownload) copy the file and rename it (lisa.jpg). you have the image.

Drag image to desktop

Drag and drop the image to the desktop works on mac

Solution:
-add a draggable="false" to the image

limit same ip connections

if a large amount of connections are open the server seems to stop responding. Opening it up to a denial of service attack from any single desktop. for example opening 50k wget downloads in my terminal made the site stop responding.

A possible fix could be to limit same ip connections to a reasonable amount and/or raising the servers file descriptor limit should help

Able to save picture

I'm able to save the picture by pressing and holding - save to images running iOS 15.0.2 (using Safari) without any issues.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.