app.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:web_develop 作者: dongweiming 项目源码 文件源码
def j():
    uploaded_file = request.files['file']

    if uploaded_file:
        paste_file = PasteFile.create_by_upload_file(uploaded_file)
        paste_file.save()
        width, height = paste_file.image_size

        return jsonify({
            'url': paste_file.url_i,
            'short_url': paste_file.url_s,
            'origin_filename': paste_file.filename,
            'hash': paste_file.filehash,
            'width': width,
            'height': height
        })

    return abort(400)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号