Revert media status to OK

This commit is contained in:
2023-05-11 09:04:39 +10:00
parent 42706de9df
commit 2c8ac1f155
3 changed files with 6 additions and 6 deletions

View File

@@ -58,7 +58,7 @@ class MoveMediaJob implements ShouldQueue
return; return;
} }
$this->media->status = 'moving file'; $this->media->status = 'Moving file';
$this->media->save(); $this->media->save();
$files = ["/{$this->media->name}"]; $files = ["/{$this->media->name}"];
@@ -78,7 +78,7 @@ class MoveMediaJob implements ShouldQueue
// Update the media model with the new storage and save it to the database // Update the media model with the new storage and save it to the database
$this->media->storage = $this->newStorage; $this->media->storage = $this->newStorage;
$this->media->status = ''; $this->media->status = 'OK';
$this->media->save(); $this->media->save();
} }
} }

View File

@@ -167,7 +167,7 @@ class StoreUploadedFileJob implements ShouldQueue
unlink($this->uploadedFilePath); unlink($this->uploadedFilePath);
} }
$this->media->status = ''; $this->media->status = 'OK';
$this->media->save(); $this->media->save();
} catch (\Exception $e) { } catch (\Exception $e) {
Log::error($e->getMessage()); Log::error($e->getMessage());

View File

@@ -333,7 +333,7 @@ const handleClickInsert = async () => {
if (result.data) { if (result.data) {
const data = result.data as MediaResponse; const data = result.data as MediaResponse;
if ( if (
data.medium.status != "" && data.medium.status != "OK" &&
data.medium.status.startsWith("Failed") == false data.medium.status.startsWith("Failed") == false
) { ) {
progressText.value = `${data.medium.status}...`; progressText.value = `${data.medium.status}...`;
@@ -361,7 +361,7 @@ const handleClickInsert = async () => {
updateResult.data as MediaResponse; updateResult.data as MediaResponse;
if ( if (
updateData.medium.status == "" updateData.medium.status == "OK"
) { ) {
data.medium = updateData.medium; data.medium = updateData.medium;
mediaProcessed = true; mediaProcessed = true;
@@ -385,7 +385,7 @@ const handleClickInsert = async () => {
} }
} }
if (data.medium.status.length == 0) { if (data.medium.status == "OK") {
closeDialog(data.medium); closeDialog(data.medium);
} else { } else {
return; return;