{"id":26713,"date":"2025-04-19T16:46:01","date_gmt":"2025-04-19T08:46:01","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/26713.html"},"modified":"2025-04-19T16:46:01","modified_gmt":"2025-04-19T08:46:01","slug":"%e9%b8%bf%e8%92%99%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91-%e9%80%89%e6%8b%a9%e5%9b%be%e5%ba%93%e7%85%a7%e7%89%87%e4%b8%8a%e4%bc%a0%e8%87%b3%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%88request-uploadfile%ef%bc%88","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/26713.html","title":{"rendered":"\u9e3f\u8499\u5e94\u7528\u5f00\u53d1-\u9009\u62e9\u56fe\u5e93\u7167\u7247\u4e0a\u4f20\u81f3\u670d\u52a1\u5668\uff08request.uploadFile\uff08\uff09\uff09"},"content":{"rendered":"<p>\u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u4ecb\u7ecd\u5982\u4f55\u5728\u9e3f\u8499\u5e94\u7528\u5f00\u53d1\u4e2d\u5b9e\u73b0\u9009\u62e9\u672c\u5730\u56fe\u5e93\u7167\u7247\u5e76\u4e0a\u4f20\u81f3\u670d\u52a1\u5668\u7684\u529f\u80fd\u3002\u5c06\u901a\u8fc7\u4e09\u4e2a\u4e3b\u8981\u6b65\u9aa4&#xff1a;\u9009\u62e9\u56fe\u7247\u3001\u62f7\u8d1d\u5230\u7f13\u5b58\u76ee\u5f55\u3001\u4e0a\u4f20\u5230\u670d\u52a1\u5668&#xff0c;\u6765\u89e3\u91cal\u6574\u4e2a\u8fc7\u7a0b&#xff0c;\u5728\u5173\u952e\u6b65\u9aa4\u4e2d\u52a0\u5165\u5fc5\u8981\u7684\u6ce8\u610f\u4e8b\u9879\u548c\u5751\u70b9\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"963\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419084559-680362c76c42c.gif\" width=\"453\" \/><\/p>\n<p><span style=\"color:#fe2c24\">\u6a21\u62df\u5668\u4e0d\u80fd\u6b63\u786e\u663e\u793a\u4f46\u622a\u56fe\u540e\u7b2c\u4e00\u4e2a\u4f4d\u7f6e\u6709\u56fe\u7247<\/span><\/p>\n<h3>\u7b2c\u4e00\u6b65&#xff1a;\u7528\u6237\u9009\u62e9\u56fe\u7247<\/h3>\n<p>\u5728\u9e3f\u8499\u7cfb\u7edf\u4e2d&#xff0c;\u4f7f\u7528<span style=\"color:#ff9900\">PhotoViewPicker<\/span>\u5bf9\u8c61\u6765\u5b9e\u73b0\u56fe\u7247\u9009\u62e9\u529f\u80fd\u3002\u4ee3\u7801\u793a\u4f8b\u4e2d\u5b9a\u4e49\u4e86\u4e00\u4e2a<span style=\"color:#ffd900\">pickerAvatar<\/span>\u51fd\u6570&#xff0c;\u8d1f\u8d23\u5f15\u5bfc\u7528\u6237\u9009\u62e9\u4e00\u5f20\u56fe\u7247&#xff0c;\u5e76\u8fd4\u56de\u8be5\u56fe\u7247\u7684\u5185\u5b58\u5730\u5740&#xff08;URI&#xff09;\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"729\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419084559-680362c79421b.png\" width=\"416\" \/><\/p>\n<h5>\u4ee3\u7801\u89e3\u6790&#xff1a;<\/h5>\n<p> tsconst options &#061; new picker.PhotoSelectOptions<br \/>\noptions.MIMEType &#061; picker.PhotoViewMIMETypes.IMAGE_TYPE \/\/ \u6307\u5b9a\u53ea\u80fd\u9009\u62e9\u56fe\u7247\u7c7b\u578b<br \/>\noptions.maxSelectNumber &#061; 1 \/\/ \u7528\u6237\u53ea\u80fd\u9009\u62e9\u4e00\u5f20\u56fe\u7247 <\/p>\n<ul>\n<li>\n<p>\u6ce8\u610f&#xff1a;\u8bbe\u7f6e<span style=\"color:#ff9900\">MIMEType<\/span>\u786e\u4fdd\u7528\u6237\u53ea\u80fd\u9009\u62e9\u56fe\u7247&#xff0c;\u9632\u6b62\u9009\u62e9\u5176\u4ed6\u6587\u4ef6\u7c7b\u578b\u5bfc\u81f4\u7a0b\u5e8f\u9519\u8bef\u3002<\/p>\n<\/li>\n<\/ul>\n<p> tsconst pickerView &#061; new picker.PhotoViewPicker()<br \/>\nlet urls &#061; await pickerView.select(options)<br \/>\nif (urls.photoUris.length &lt;&#061; 0) {<br \/>\n \u00a0return<br \/>\n}<br \/>\nlet imgUrl &#061; urls.photoUris[0]<br \/>\nreturn imgUrl<br \/>\nAlertDialog.show({ message: imgUrl }) <\/p>\n<ul>\n<li>\n<p>\u6ce8\u610f&#xff1a;\u52a1\u5fc5\u68c0\u67e5<span style=\"color:#fe2c24\">urls.photoUris<\/span>\u7684\u957f\u5ea6&#xff0c;\u786e\u4fdd\u7528\u6237\u771f\u7684\u9009\u62e9\u4e86\u56fe\u7247\u3002\u82e5\u6ca1\u6709\u9009\u62e9\u56fe\u7247&#xff0c;\u5219\u51fd\u6570\u63d0\u524d\u9000\u51fa\u3002<\/p>\n<\/li>\n<\/ul>\n<h3>\u7b2c\u4e8c\u6b65&#xff1a;\u62f7\u8d1d\u56fe\u7247\u5230\u7f13\u5b58\u76ee\u5f55<\/h3>\n<p>\u7528\u6237\u9009\u62e9\u7684\u56fe\u7247\u901a\u5e38\u4f4d\u4e8e\u53ea\u8bfb\u5b58\u50a8\u4e2d&#xff0c;\u9700\u8981\u5c06\u5176\u62f7\u8d1d\u5230\u5e94\u7528\u7684\u7f13\u5b58\u76ee\u5f55&#xff0c;\u4ee5\u4fbf\u540e\u7eed\u5904\u7406\u3002<\/p>\n<h5>\u4ee3\u7801\u89e3\u6790&#xff1a;<\/h5>\n<p> tsconst file &#061; fs.openSync(photoImgPath, fs.OpenMode.READ_ONLY) \/\/ \u6253\u5f00\u6587\u4ef6\u4e3a\u53ea\u8bfb\u6a21\u5f0f<br \/>\nlet fileFD &#061; file.fd<br \/>\nlet destPath &#061; getContext().cacheDir \/\/ \u83b7\u53d6\u7f13\u5b58\u76ee\u5f55\u8def\u5f84<br \/>\nlet fileName &#061; Date.now().toString() &#043; &#039;.jpg&#039; \/\/ \u751f\u6210\u65b0\u7684\u6587\u4ef6\u540d<br \/>\nlet fullPath &#061; destPath &#043; &#039;\/&#039; &#043; fileName<br \/>\nAlertDialog.show({ message: &#039;\u5b8c\u6574\u8def\u5f84&#039; &#043; fullPath })<br \/>\nfs.copyFileSync(fileFD, fullPath) \/\/ \u62f7\u8d1d\u6587\u4ef6<br \/>\nreturn [&#096;internal:\/\/cache\/${fileName}&#096;, fileName] <\/p>\n<ul>\n<li>\n<p>\u6ce8\u610f&#xff1a;\u751f\u6210\u7684\u6587\u4ef6\u540d\u8981\u786e\u4fdd\u552f\u4e00&#xff0c;\u907f\u514d\u8986\u76d6\u5df2\u6709\u6587\u4ef6\u3002\u4f7f\u7528\u65f6\u95f4\u6233\u53ef\u4ee5\u90e8\u5206\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898&#xff0c;\u4f46\u5728\u9ad8\u5e76\u53d1\u573a\u666f\u4e0b\u4ecd\u53ef\u80fd\u6709\u51b2\u7a81\u3002<\/p>\n<\/li>\n<li>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"658\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419084559-680362c7bb2b6.png\" width=\"963\" \/><\/p>\n<\/li>\n<\/ul>\n<h3>\u7b2c\u4e09\u6b65&#xff1a;\u4e0a\u4f20\u56fe\u7247\u5230\u670d\u52a1\u5668<\/h3>\n<p>\u5f97\u5230\u7f13\u5b58\u76ee\u5f55\u4e2d\u7684\u56fe\u7247\u6587\u4ef6\u540e&#xff0c;\u901a\u8fc7\u7f51\u7edc\u8bf7\u6c42\u5c06\u5176\u4e0a\u4f20\u81f3\u670d\u52a1\u5668\u3002\u5728\u4e0a\u4f20\u8fc7\u7a0b\u4e2d&#xff0c;\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u65e5\u5fd7\u6216\u8005UI\u6765\u76d1\u542c\u4e0a\u4f20\u8fdb\u5ea6&#xff08;\u65e5\u5fd7\u793a\u4f8b&#xff09;\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"861\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419084600-680362c80abda.png\" width=\"409\" \/><\/p>\n<h5 style=\"background-color:transparent\">\u4ee3\u7801\u89e3\u6790&#xff1a;<\/h5>\n<p> tslet user &#061; AppStorage.get(&#039;user&#039;) as ILoginUsersModel<br \/>\nlet token &#061; user?.token<br \/>\nlet uploader &#061; await request.uploadFile(getContext(), {<br \/>\n \u00a0 \u00a0method: &#039;POST&#039;,<br \/>\n \u00a0 \u00a0url: &#039;https:\/\/teach.itheima.net\/hm\/userInfo\/avatar&#039;,<br \/>\n \u00a0 \u00a0header: {<br \/>\n \u00a0 \u00a0 \u00a0&#039;Content-Type&#039;: &#039;multipart\/form-data&#039;,<br \/>\n \u00a0 \u00a0 \u00a0&#039;Authorization&#039;: &#096;Bearer ${token}&#096;<br \/>\n \u00a0  },<br \/>\n \u00a0 \u00a0files: [{ filename: arr[1], type: &#039;jpg&#039;, name: &#039;file&#039;, uri: arr[0] }],<br \/>\n \u00a0 \u00a0data: []<br \/>\n  })<br \/>\n\u200b<br \/>\nuploader.on(&#039;progress&#039;, (uploadedSize, totalSize) &#061;&gt; {<br \/>\n \u00a0 \u00a0Logger.info(&#039;\u4e0a\u4f20\u5927\u5c0f&#039; &#043; uploadedSize, &#039;\u603b\u5927\u5c0f&#xff1a;&#039; &#043; totalSize)<br \/>\n \u00a0 \u00a0if (uploadedSize &#061;&#061;&#061; totalSize) {<br \/>\n \u00a0 \u00a0 \u00a0AlertDialog.show({ message: &#039;\u4e0a\u4f20\u5df2\u5b8c\u6210&#039; })<br \/>\n \u00a0  }<br \/>\n}) <\/p>\n<ul>\n<li>\n<p>\u6ce8\u610f&#xff1a;\u5728\u4e0a\u4f20\u6587\u4ef6\u65f6&#xff0c;\u76d1\u542c\u4e0a\u4f20\u8fdb\u5ea6\u53ef\u4ee5\u7528\u4e8e\u8c03\u8bd5&#xff0c;\u8fd8\u53ef\u4ee5\u589e\u5f3a\u7528\u6237\u4ea4\u4e92\u4f53\u9a8c\u3002\u901a\u8fc7progress\u4e8b\u4ef6&#xff0c;\u6211\u4eec\u80fd\u591f\u5b9e\u65f6\u66f4\u65b0\u7528\u6237\u754c\u9762&#xff0c;\u5c55\u793a\u4e0a\u4f20\u8fdb\u5ea6\u3002<\/p>\n<\/li>\n<li>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"94\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419084600-680362c831bba.png\" width=\"418\" \/><\/p>\n<\/li>\n<li>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"963\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419084600-680362c851458.gif\" width=\"453\" \/><\/p>\n<\/li>\n<\/ul>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u4e0a\u9762\u6848\u4f8b\u4e2d\u5728\u9e3f\u8499\u7cfb\u7edf\u5f00\u53d1\u4e2d\u5b9e\u73b0\u4ece\u9009\u62e9\u56fe\u7247\u5230\u4e0a\u4f20\u56fe\u7247&#xff0c;\u5e76\u589e\u52a0\u4e86\u8fdb\u5ea6\u76d1\u63a7\u529f\u80fd\u3002\u5728\u5b9e\u73b0\u65f6\u5e94\u6ce8\u610f\u6587\u4ef6\u7c7b\u578b\u7684\u6b63\u786e\u6027\u3001\u6587\u4ef6\u547d\u540d\u7684\u552f\u4e00\u6027\u3001\u7f51\u7edc\u8bf7\u6c42\u7684\u5b89\u5168\u6027\u3002<\/p>\n<h2 style=\"background-color:transparent\">\u5b8c\u6574\u5c01\u88c5\u51fd\u6570\u4ee3\u7801&#xff1a;<\/h2>\n<p> \/\/1.\u7528\u6237\u9009\u62e9\u56fe\u7247\u540e\u8fd4\u56de\u4e00\u4e2a\u5185\u5b58\u5730\u5740<br \/>\nasync pickerAvatar() {<br \/>\n  \/\/1.\u5f15\u5bfc\u7528\u6237\u9009\u62e9\u4e00\u5f20\u7cfb\u7edf\u76f8\u518c\u7167\u7247<br \/>\n  \/\/1.1\u7ed1\u5b9a\u7528\u6237\u53ea\u80fd\u4ece\u7cfb\u7edf\u76f8\u518c\u9009\u62e9\u4e00\u5f20\u56fe\u7247<br \/>\n  const options &#061; new picker.PhotoSelectOptions<br \/>\n  options.MIMEType &#061; picker.PhotoViewMIMETypes.IMAGE_TYPE \/\/\u53ea\u80fd\u9009\u62e9\u76f8\u7247\u8d44\u6e90<br \/>\n  options.maxSelectNumber &#061; 1 \/\/\u6700\u5927\u9009\u62e9\u56fe\u7247\u6570\u76ee<\/p>\n<p>  \/\/1.2 \u5229\u7528PhotoViewPicker\u5bf9\u8c61\u5b9e\u4f8b\u4e2d\u7684select\u81ea\u52a8\u83b7\u53d6\u5230\u7528\u6237\u9009\u62e9\u7684\u90a3\u5f20\u56fe\u7247\u7684\u5730\u5740<br \/>\n  const pickerView &#061; new picker.PhotoViewPicker()<br \/>\n  let urls &#061; await pickerView.select(options)<br \/>\n  if (urls.photoUris.length &lt;&#061; 0) {<br \/>\n    return<br \/>\n  }<br \/>\n  let imgUrl &#061; urls.photoUris[0]<br \/>\n  return imgUrl<br \/>\n  AlertDialog.show({ message: imgUrl })<br \/>\n}<\/p>\n<p>\/\/2.\u5229\u7528\u5df2\u83b7\u5f97\u7684\u5185\u5b58\u5730\u5740\u5c06\u7cfb\u7edf\u76f8\u518c\u7684\u56fe\u7247\u62f7\u8d1d\u5230\u7f13\u5b58\u76ee\u5f55<br \/>\nasync copyImgToCache(photoImgPath: string) {<br \/>\n  \/\/<br \/>\n  \/\/ 2.1 \u6839\u636e\u6e90\u5730\u5740\u83b7\u53d6\u6587\u4ef6\u7684\u78c1\u76d8\u76ee\u5f55&#xff0c;\u901a\u8fc7openSync()\u6765\u83b7\u5f97\u7684\u5185\u5b58\u5730\u5740<br \/>\n  const file &#061; fs.openSync(photoImgPath, fs.OpenMode.READ_ONLY)<br \/>\n  let fileFD &#061; file.fd<\/p>\n<p>  \/\/2.2\u5229\u7528fs\u62f7\u8d1d\u5230\u76ee\u6807\u5730\u5740<br \/>\n  \/\/\u83b7\u53d6\u76ee\u6807\u5730\u5740\u6587\u4ef6\u5939\u76ee\u5f55<br \/>\n  let destPath &#061; getContext().cacheDir<br \/>\n  \/\/\u968f\u673a\u751f\u6210\u4e00\u4e2a\u6587\u4ef6\u540d<br \/>\n  let fileName &#061; Date.now().toString()<br \/>\n  \/\/\u56fa\u5b9a\u4e00\u4e2a\u6587\u4ef6\u6269\u5c55\u540d<br \/>\n  const ext &#061; &#039;jpg&#039;<br \/>\n  \/\/\u7ec4\u5408\u6210\u4e00\u4e2a\u5b8c\u6574\u7684\u76ee\u6807\u6587\u4ef6\u8def\u5f84<br \/>\n  let fullPath &#061; destPath &#043; &#039;\/&#039; &#043; fileName &#043; &#039;.&#039; &#043; ext<br \/>\n  AlertDialog.show({ message: &#039;\u5b8c\u6574\u8def\u5f84&#039; &#043; fullPath })<br \/>\n  fs.copyFileSync(fileFD, fullPath)<br \/>\n  \/\/internal:\/\/cache\u4ee3\u8868fullPath \u7684\u6587\u4ef6\u8def\u5f84<br \/>\n  return [&#096;internal:\/\/cache\/${fileName &#043; &#039;.&#039; &#043; ext}&#096;, fileName &#043; &#039;.&#039; &#043; ext]<br \/>\n}<\/p>\n<p>\/\/3.\u5c06\u83b7\u53d6\u5230\u7684\u56fe\u7247\u4e0a\u4f20\u5230\u670d\u52a1\u5668<br \/>\nasync uploadAvatar(arr: string[]) {<br \/>\n  let user &#061; AppStorage.get(&#039;user&#039;) as ILoginUsersModel<br \/>\n  let token &#061; user?.token<br \/>\n  let uploader &#061; await request.uploadFile(getContext(), {<br \/>\n    method: &#039;POST&#039;,<br \/>\n    url: &#039;https:\/\/teach.itheima.net\/hm\/userInfo\/avatar&#039;,<br \/>\n    header: {<br \/>\n      &#039;Content-Type&#039;: &#039;multipart\/form-data&#039;,<br \/>\n      &#039;Authorization&#039;: &#096;Bearer ${token}&#096;<br \/>\n    },<br \/>\n    files: [{ filename: arr[1], type: &#039;jpg&#039;, name: &#039;file&#039;, uri: arr[0] }],<br \/>\n    data: []<br \/>\n  })<br \/>\n  uploader.on(&#039;progress&#039;, (uploadedSize, totleSize) &#061;&gt; {<br \/>\n    Logger.info(&#039;\u4e0a\u4f20\u5927\u5c0f&#039; &#043; uploadedSize, &#039;\u603b\u5927\u5c0f&#xff1a;&#039; &#043; totleSize)<br \/>\n    if (uploadedSize &#061;&#061;&#061; totleSize) {<br \/>\n      AlertDialog.show({ message: &#039;\u4e0a\u4f20\u5df2\u5b8c\u6210&#039; })<br \/>\n    }<br \/>\n  })<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb6.2k\u6b21\uff0c\u70b9\u8d5e40\u6b21\uff0c\u6536\u85cf47\u6b21\u3002\u5728\u9e3f\u8499\u7cfb\u7edf\u5f00\u53d1\u4e2d\u5b9e\u73b0\u4ece\u9009\u62e9\u56fe\u7247\u5230\u4e0a\u4f20\u56fe\u7247\uff0c\u5e76\u589e\u52a0\u4e86\u8fdb\u5ea6\u76d1\u63a7\u529f\u80fd\u3002\u5728\u5b9e\u73b0\u65f6\u5e94\u6ce8\u610f\u6587\u4ef6\u7c7b\u578b\u7684\u6b63\u786e\u6027\u3001\u6587\u4ef6\u547d\u540d\u7684\u552f\u4e00\u6027\u3001\u7f51\u7edc\u8bf7\u6c42\u7684\u5b89\u5168\u6027\u3002_\u9e3f\u8499\u4e0a\u4f20\u56fe\u7247\u5230\u670d\u52a1\u5668\u600e\u4e48\u5f04<\/p>\n","protected":false},"author":2,"featured_media":26707,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[280,2136,568,67,43],"topic":[],"class_list":{"0":"post-26713","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-server","8":"tag-harmonyos","10":"tag-typescript","11":"tag-67","12":"tag-43"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u9e3f\u8499\u5e94\u7528\u5f00\u53d1-\u9009\u62e9\u56fe\u5e93\u7167\u7247\u4e0a\u4f20\u81f3\u670d\u52a1\u5668\uff08request.uploadFile\uff08\uff09\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/26713.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u9e3f\u8499\u5e94\u7528\u5f00\u53d1-\u9009\u62e9\u56fe\u5e93\u7167\u7247\u4e0a\u4f20\u81f3\u670d\u52a1\u5668\uff08request.uploadFile\uff08\uff09\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb6.2k\u6b21\uff0c\u70b9\u8d5e40\u6b21\uff0c\u6536\u85cf47\u6b21\u3002\u5728\u9e3f\u8499\u7cfb\u7edf\u5f00\u53d1\u4e2d\u5b9e\u73b0\u4ece\u9009\u62e9\u56fe\u7247\u5230\u4e0a\u4f20\u56fe\u7247\uff0c\u5e76\u589e\u52a0\u4e86\u8fdb\u5ea6\u76d1\u63a7\u529f\u80fd\u3002\u5728\u5b9e\u73b0\u65f6\u5e94\u6ce8\u610f\u6587\u4ef6\u7c7b\u578b\u7684\u6b63\u786e\u6027\u3001\u6587\u4ef6\u547d\u540d\u7684\u552f\u4e00\u6027\u3001\u7f51\u7edc\u8bf7\u6c42\u7684\u5b89\u5168\u6027\u3002_\u9e3f\u8499\u4e0a\u4f20\u56fe\u7247\u5230\u670d\u52a1\u5668\u600e\u4e48\u5f04\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/26713.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-19T08:46:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419084559-680362c76c42c.gif\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/26713.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/26713.html\",\"name\":\"\u9e3f\u8499\u5e94\u7528\u5f00\u53d1-\u9009\u62e9\u56fe\u5e93\u7167\u7247\u4e0a\u4f20\u81f3\u670d\u52a1\u5668\uff08request.uploadFile\uff08\uff09\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-19T08:46:01+00:00\",\"dateModified\":\"2025-04-19T08:46:01+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/26713.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/26713.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/26713.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u9e3f\u8499\u5e94\u7528\u5f00\u53d1-\u9009\u62e9\u56fe\u5e93\u7167\u7247\u4e0a\u4f20\u81f3\u670d\u52a1\u5668\uff08request.uploadFile\uff08\uff09\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u9e3f\u8499\u5e94\u7528\u5f00\u53d1-\u9009\u62e9\u56fe\u5e93\u7167\u7247\u4e0a\u4f20\u81f3\u670d\u52a1\u5668\uff08request.uploadFile\uff08\uff09\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/26713.html","og_locale":"zh_CN","og_type":"article","og_title":"\u9e3f\u8499\u5e94\u7528\u5f00\u53d1-\u9009\u62e9\u56fe\u5e93\u7167\u7247\u4e0a\u4f20\u81f3\u670d\u52a1\u5668\uff08request.uploadFile\uff08\uff09\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb6.2k\u6b21\uff0c\u70b9\u8d5e40\u6b21\uff0c\u6536\u85cf47\u6b21\u3002\u5728\u9e3f\u8499\u7cfb\u7edf\u5f00\u53d1\u4e2d\u5b9e\u73b0\u4ece\u9009\u62e9\u56fe\u7247\u5230\u4e0a\u4f20\u56fe\u7247\uff0c\u5e76\u589e\u52a0\u4e86\u8fdb\u5ea6\u76d1\u63a7\u529f\u80fd\u3002\u5728\u5b9e\u73b0\u65f6\u5e94\u6ce8\u610f\u6587\u4ef6\u7c7b\u578b\u7684\u6b63\u786e\u6027\u3001\u6587\u4ef6\u547d\u540d\u7684\u552f\u4e00\u6027\u3001\u7f51\u7edc\u8bf7\u6c42\u7684\u5b89\u5168\u6027\u3002_\u9e3f\u8499\u4e0a\u4f20\u56fe\u7247\u5230\u670d\u52a1\u5668\u600e\u4e48\u5f04","og_url":"https:\/\/www.wsisp.com\/helps\/26713.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-19T08:46:01+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419084559-680362c76c42c.gif"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/26713.html","url":"https:\/\/www.wsisp.com\/helps\/26713.html","name":"\u9e3f\u8499\u5e94\u7528\u5f00\u53d1-\u9009\u62e9\u56fe\u5e93\u7167\u7247\u4e0a\u4f20\u81f3\u670d\u52a1\u5668\uff08request.uploadFile\uff08\uff09\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-19T08:46:01+00:00","dateModified":"2025-04-19T08:46:01+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/26713.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/26713.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/26713.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u9e3f\u8499\u5e94\u7528\u5f00\u53d1-\u9009\u62e9\u56fe\u5e93\u7167\u7247\u4e0a\u4f20\u81f3\u670d\u52a1\u5668\uff08request.uploadFile\uff08\uff09\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/26713","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=26713"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/26713\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/26707"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=26713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=26713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=26713"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=26713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}