You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					11 lines
				
				303 B
			
		
		
			
		
	
	
					11 lines
				
				303 B
			| 
											2 years ago
										 | from fastapi import FastAPI | ||
| 
											2 years ago
										 | from fastapi.staticfiles import StaticFiles | ||
|  | from config.env import UploadConfig | ||
|  | 
 | ||
|  | 
 | ||
| 
											2 years ago
										 | def mount_staticfiles(app: FastAPI): | ||
|  |     """
 | ||
|  |     挂载静态文件 | ||
|  |     """
 | ||
| 
											1 year ago
										 |     app.mount(f'{UploadConfig.UPLOAD_PREFIX}', StaticFiles(directory=f'{UploadConfig.UPLOAD_PATH}'), name='profile') |