Automation init...3

This commit is contained in:
최준흠 2024-09-15 17:00:58 +09:00
parent ef35c6af21
commit 7f04abe807
3 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@ class BoardLibrary extends CommonLibrary
$formDatas['content'] = "";
foreach ($storages as $storage) {
if ($formDatas['image_path'] == "") {
$formDatas['image_path'] = sprintf("%s/%s/%s", $storage->getBasePath(), $storage->getPath(), $storage->getOriginName());
$formDatas['image_path'] = $storage->getBasePath() . DIRECTORY_SEPARATOR . $storage->getPath() . DIRECTORY_SEPARATOR . $storage->getOriginName();
}
$formDatas['content'] .= $storage->getHTMLTag();
}

View File

@ -46,7 +46,7 @@ class FileLibrary extends CommonLibrary
$formDatas['user_name'] = $this->getUserEntity()->getTitle();
$formDatas['board_name'] = $this->getBoardsEntity()->getTitle();
$formDatas['table_name'] = $this->getModel()->getTable();
$formDatas['file_path'] = $storage->getPath() . DIRECTORY_SEPARATOR . $storage->getOriginName();
$formDatas['file_path'] = $storage->getBasePath() . DIRECTORY_SEPARATOR . $storage->getPath() . DIRECTORY_SEPARATOR . $storage->getOriginName();
$formDatas['file_name'] = $storage->getOriginName();
$formDatas['file_type'] = $storage->getMimeType();
$formDatas['file_caption'] = $storage->getOriginName();

View File

@ -21,7 +21,7 @@ class MangboardStorage extends FileStorage
}
public function getUploadURL(): string
{
return sprintf("/wp-content/%s/%s", parent::getUploadURL(), $this->getBasePath());
return sprintf("/wp-content/%s/%s/%s", parent::getUploadURL(), $this->getBasePath(), $this->getBasePath());
}
public function getModel(): FileModel
{