Skip to content

Commit

Permalink
Fixed error on csv file uploading.
Browse files Browse the repository at this point in the history
  • Loading branch information
msyk committed Apr 25, 2024
1 parent 74fdab0 commit 1f48bf9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/php/FileUploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ public function processingWithParameters(?array $dataSource, ?array $options, ?
$mediaClassObj = new $className();
$mediaClassObj->processing($this->db, $this->url, $options, $files, $noOutput, $field,
$contextName, $keyField, $keyValue, $dataSource, $dbSpec, $debug);
if ($field[0] == "_im_csv_upload") { // CSV File uploading
if (isset($this->db->outputOfProcessing['dbresult'])) { // For CSV importing
$this->dbresult = $this->db->outputOfProcessing['dbresult'];
}
}
}

//
Expand Down
3 changes: 0 additions & 3 deletions src/php/Media/FileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ public function processing(Proxy $db, ?string $url, ?array $options, array $fil

if ($targetFieldName == "_im_csv_upload") { // CSV File uploading
$this->csvImportOperation($db, $dataSource, $options, $dbSpec, $debug, $contextName, $fileInfoTemp);
if (isset($db->outputOfProcessing['dbresult'])) { // For CSV importing
$this->dbresult = $db->outputOfProcessing['dbresult'];
}
} else { // Any kind of files are uploaded.
list($result, $filePath, $filePartialPath) = $this->decideFilePath($db, $noOutput, $options,
$contextName, $keyField, $keyValue, $targetFieldName, $filePathInfo);
Expand Down

0 comments on commit 1f48bf9

Please sign in to comment.