修正删除请求的接受方式

This commit is contained in:
Chenx221 2024-02-12 11:59:55 +08:00
parent e46ed84b0b
commit 0ce6a052f1
Signed by: chenx221
GPG Key ID: D7A9EC07024C3021

View File

@ -174,11 +174,13 @@ class HomeController extends Controller
/**
* 删除文件或文件夹
* @param string $relativePath 文件或文件夹的相对路径
* @throws NotFoundHttpException 如果文件或文件夹不存在
*/
public function actionDelete($relativePath)
public function actionDelete()
{
// 从 POST 请求中获取 relativePath 参数
$relativePath = Yii::$app->request->post('relativePath');
// 对相对路径进行解码
$relativePath = rawurldecode($relativePath);