From 59993fc33c6b6c3cbed315b3347b994a2cddd361 Mon Sep 17 00:00:00 2001 From: Matthias Guillitte Date: Mon, 8 Sep 2025 16:16:40 +0200 Subject: [PATCH] Fix post file input not found --- .../Jobs/InstagramRepost/InstagramRepostJob.php | 2 +- routes/api.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/Browser/Jobs/InstagramRepost/InstagramRepostJob.php b/app/Browser/Jobs/InstagramRepost/InstagramRepostJob.php index ecf9be6..4531efc 100644 --- a/app/Browser/Jobs/InstagramRepost/InstagramRepostJob.php +++ b/app/Browser/Jobs/InstagramRepost/InstagramRepostJob.php @@ -344,7 +344,7 @@ class InstagramRepostJob extends InstagramAbstractJob implements ShouldBeUniqueU $selectFileButton = $browser->driver->findElement(WebDriverBy::xpath('//button[contains(text(), "Select from computer")]')); $selectFileButton->click(); sleep(2); - $browser->attach('input[type="file"]._ac69', $this->downloadFolder . $reel->reel_id . ".mp4"); + $browser->attach('input[type="file"]', $this->downloadFolder . $reel->reel_id . ".mp4"); sleep(10); // TODO : Wait for the file to be uploaded diff --git a/routes/api.php b/routes/api.php index 37712d0..34f9827 100644 --- a/routes/api.php +++ b/routes/api.php @@ -1,5 +1,6 @@ name('jobs.test'); + +Route::get('/testInstagramNotification', function (Request $request, BrowserJobsInstances $BrowserJobsInstances) { + $id = 4; + $job = new InstagramNotificationHandlingJob($id); + $log = $job->execute(); + dump($log); + dump(response()->json(['message' => 'Job ' . $id . ' ran', 'jobRun' => $log->load('artifacts')])); +}); +