Git Product home page Git Product logo

single-click-download-for-a1111's Introduction

Single-Click-Download-for-A1111

a semi-working attempt to add a single click download button to a1111 for currently previewed images in the gallery and lightbox.

the majority of the code is adapeted from the exstension by AlUlkesh, the link is here https://github.com/AlUlkesh/sd_delete_button?tab=readme-ov-file

my knowlede of programming is very basic, and the lack of documentaion of a1111 is the worst i've ever seen. my goal is to add a button to the gallery button bar and the lightnbox modal toolbar, this button will "download"/copy the current viewed image to the users downloads folder.

Current capabilities:

1. Able to download the currently viewed image in the lightbox (full preview) with no limitation. (note that this method uses an automatic download, meaning once you click the DL button it will download automatically without asking/verifing the download. Most browser have a protection against this, so the browser may ask you if you want to allow the website (A1111 client host) to be able to download multiple files. at least this is what happened to me on chrome when i was testing it, the reason for this is most likely because: the JS code adds a clickable button to the menu bar, the button when click, calls a function that finds the html image hyperlink and on behalf of the user, clicks/downloads the image... basicly the button functions as a 'get & fetch' download link that referenced the currently viewed picture. the reason for the web browser stopping this, is, to my knowledge, to prevent end users & Website Host from downloading files to the end user without their consent/knowlage. i'm NOT a secerity expert, but this extension of mine does NOT use/imploment/request/send/ect any form of outward connection. it soley uses functionality built into the browser's that runs soley on the end user's device. Please look through the code yourself. there is probably a better way to do this but i know of it not) TL:DR: button scrapes the html code for the viewed image's hyperlink, it then clones the link and clicks the download itself.

2. able to COPY to downloads when ONLY batch size:1, batch count:1. (working to make this work like the lightbox download. this limitation is due to my/the inability to retriecve the current gallery image index from the python side (backend). lightbox uses JS to do it's download)

Planed capabilities:

1. limitation free, single click download for the gallery output pane.

2. ablity to use the upscale image button in the lightbox, currently it does the same function of the download.

what i have so far (the blue down arrow is the added button and the upscale button is added to the lightbox) semi functional implemtation Screenshot 2024-06-02 202704

single-click-download-for-a1111's People

Contributors

themodmaster8 avatar

Watchers

 avatar

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.