若干后端代码改进 - #1
Open
FK2469 wants to merge 9 commits into
Open
Conversation
Owner
|
👍 👍 抱歉现在才看到 |
Author
|
刚刚修改了一下,虽然好像还是没有解决mode的问题... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
flask及相关扩展至最新版本Python3app拆分成app,models,ext三个模块symlink字段,使用short_url包,依据PasteFile实例的id字段来生成短链接filemd5字段作为文件的标识。创建PasteFile实例前会先保存文件,保存的文件名是rst.path。如果通过被上传文件的md5值判断的文件之前已经上传过,则直接删掉这个文件,并返回之前创建的文件。corrupt状态,即数据库中有相应记录但本地文件已经损坏。在此情况下,用户可以重新上传相应文件,并且可以继续使用之前的短链接。werkzeug.secure_filename来保证文件名安全