Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Deployment #4

Open
james00000007 opened this issue Dec 19, 2024 · 4 comments
Open

Docker Deployment #4

james00000007 opened this issue Dec 19, 2024 · 4 comments

Comments

@james00000007
Copy link

Hello
any Docker Installation method for VPS, also wanted to know how can i add new host with API key

@spel987
Copy link
Owner

spel987 commented Dec 26, 2024

Hello, at the moment I don't provide Docker installation, why not in the future... 🤔

To add a new host by hand, you'll need to modify the JavaScript and HTML code a little.
Getting started, the application stores API keys in the file /Resources/api_keys.json (or /src-tauri/Resources/api_keys.json if you're in the working environment with the application not yet compiled).

To add a new host, use the initial structure of a host in the table grouping them all together, like this one for example:

<tr class="alternate-row search-result">
          <td class="px-4 py-2 flex items-center mt-1.5">
            <img src="images\devuploads.com.png" alt="DevUploads Logo" class="h-5 mr-1">
            DevUploads&nbsp(<a class="text-sky-400" href="https://devuploads.com/" target="_blank">https://devuploads.com/</a>)
          </td>
          <td class="px-4 py-2">5 GB</td>
          <td class="px-4 py-2">30 days</td>
          <td class="px-4 py-2 text-center">
            <!-- ... -->
          </td>
</tr>

Then, in the JS, you'll need to declare several constants so that the application can correctly interpret the host (such as its URL, its discriminant, its TOS, if there are constraints to be displayed to the user... these elements are declared with the upload_preparation function). I'm not going to list them here, just look in the code for the repeated lines for each host. In any case, the request to send a host with an API key looks like this in the JS (with the get_api_key function, which simply retrieves the key present in the JSON file according to the host name):

host.forEach(function (current_host) {
    const sent_data_form = new FormData();

    url_upload_promise.then((file_to_upload) => {
      if (file_to_upload) {

        // host without API key needed
        if (current_host === "gofile.io") {
          //...
          
        });

        // host with API key needed
        } else if (current_host === "devuploads.com") {
          get_api_key(current_host).then((response) => {
            let api_key_host = response;

            fetch(url_for_bypass_cors + "https://devuploads.com/api/upload/server?key=" + api_key_host, {method: "GET", signal: controller_signal})
            .then(response => response.json())
            .then((data) => {
              const devuploads_upload_url = data.result;
              const devuploads_sess_id = data.sess_id;
              
              sent_data_form.append("sess_id", devuploads_sess_id);
              sent_data_form.append("utype", "reg");
              sent_data_form.append("file_0", file_to_upload);
              upload_to_host([url_for_bypass_cors + devuploads_upload_url + "?upload_type=file&utype=reg", "POST", sent_data_form], "json", [0, "file_code"], ["https://devuploads.com/"]);
            })
            .catch(() => {
              display_final_url(["Invalid API key", "DevUploads"]);
            });
          });

        }

        //...

If you find this task too complex or boring, let me know the name of the host you'd like to add, and if possible I'll incorporate it into a future version of my software.

In any case, thank you for your feedback, I appreciate it! 🤝

@james00000007
Copy link
Author

@spel987 👍thank you for provide the details code but i am not a pro developer and it seem to complex , i request you to please add host https://flashbang.sh/ 👌
appreciate it your work.

@spel987
Copy link
Owner

spel987 commented Dec 27, 2024

flashbang.sh is a buzzheavier.com clone (like trashbytes.net, fuckingfast.co, hidan.co, and hidan.sh). Buzzheavier has already been added to the application, although in version 1.6.0 there is currently an upload problem, which will be resolved in the next version of the application.
So I don't know if adding the clones is necessary, especially as flashbang.sh doesn't seem to be working at the moment...

@james00000007
Copy link
Author

Thanks again to update the indeed, but buzzheavier change the file policy. hence i request to flashbang.sh host,
Waiting to next Big update..🤩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants