Browse Source

更新内容

moshaorui 1 month ago
parent
commit
5e6cfdf30d
2 changed files with 1 additions and 5 deletions
  1. 0 5
      app/Http/Controllers/HomeController.php
  2. 1 0
      public/static/js/script.js

+ 0 - 5
app/Http/Controllers/HomeController.php

@@ -222,11 +222,6 @@ class HomeController extends Controller
         // Get the URL from the request parameter
         $imageUrl = $request->input('url');
 
-        // Validate the URL
-        if (filter_var($imageUrl, FILTER_VALIDATE_URL) === false) {
-            Session::put('downloadAllStatus', '2');
-            return response()->json(['error' => 'Invalid URL'], 400);
-        }
 
         try {
             // Initialize cURL

+ 1 - 0
public/static/js/script.js

@@ -382,6 +382,7 @@ $(document).ready(function() {
                     const currentImageSrc = imageSrcArray[currentImageIndex];
                     // 下载图片 js urlencode
                     href_url = '/download-image?url='+encodeURIComponent(currentImageSrc);
+
                     window.location.href = href_url;
 
                     checkDownloadStatus();