chatyou commited on
Commit
f904ce3
·
verified ·
1 Parent(s): 11451f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -823,7 +823,10 @@ def upload():
823
  finally:
824
  os.unlink(tmp.name)
825
 
826
- return jsonify({'success': True, 'filename': remote_path})
 
 
 
827
 
828
 
829
  @app.route('/list')
 
823
  finally:
824
  os.unlink(tmp.name)
825
 
826
+ # 构建完整文件访问 URL
827
+ base_url = request.host_url # 例如 "https://chatyou-filebed.hf.space/"
828
+ file_url = base_url + remote_path
829
+ return jsonify({'success': True, 'filename': file_url})
830
 
831
 
832
  @app.route('/list')