ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
python后台代码的示例(感谢QQ群 *@隔壁杨师傅* 的提供) ```python # coding=utf-8 __author__ = 'Next door to Master Yang' import os from flask import Flask, request,Response app = Flask(__name__) app.config['UPLOAD_FOLDER'] = "static" @app.route("/upload",methods = ["POST"]) def GetImage(): file = request.files['wangEditorMobileFile'] if file == None: return "error|file is not exist" else: try: filename = file.filename file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename)) result = "static/"+filename res = Response(result) res.headers["ContentType"] = "text/html" res.headers["Charset"] = "utf-8" return res except Exception,e: print(e) return "error|"+str(e) ```