file('lottery'); $data = $materialService->upload($file, $this->sellerId(), MaterialScene::LOTTERY); return $this->jsonSuccess($data); } /** * @api {POST} /api/seller/material/upload_other 上传其他功能使用的文件 * @apiVersion 0.1.0 * @apiGroup 店主 * * @apiParam {File} file 文件的name * * @apiSuccessExample {json} 返回结果 * { * "code": 200, * "message": "", * "data": { * "id": 2, // id * "file_url": "http://localhost/uploads/lottery/aEZKWqAm7qXR896PIE1cNtHbGaTYCbuDsfijFHuT.jpg" // 地址 * } * } * */ public function uploadOther(Request $request, MaterialService $materialService) { $file = $request->file('file'); $data = $materialService->upload($file, $this->sellerId(), MaterialScene::SHOP); return $this->jsonSuccess($data); } }