示例#1
0
    def GET(self, base):
        f = get_file(base)
        if not f: return app.notfound()

        if not f.type == 2: return app.notfound()

        metafile = f.metafile()

        web.header('Content-type', 'text/plain')
        return metafile.content
示例#2
0
    def GET(self, base):
        f = get_file(base)
        if not f: return app.notfound()

        web.header('Content-type', f.mime)
        web.header('Content-disposition', 'attachment; filename=' + f.name)
        data = ''
        with open(os.path.join(config.UPLOAD_DIRECTORY, f.filename)) as f:
            data = f.read()
        return data
示例#3
0
    def GET(self, base):
        f = get_file(base)
        if not f: return app.notfound()

        metafile = f.metafile()

        if metafile:
            return render_plain.render(metafile.template)(f, metafile)

        return render_plain.upload(f)
示例#4
0
文件: main.py 项目: Paaskehare/upl.so
    def GET(self, base):
        f = get_file(base)
        if not f: return app.notfound()

        if not f.type == 2: return app.notfound()

        metafile = f.metafile()

        web.header('Content-type', 'text/plain')
        return metafile.content 
示例#5
0
文件: main.py 项目: Paaskehare/upl.so
    def GET(self, base):
        f = get_file(base) 
        if not f: return app.notfound()

        web.header('Content-type', f.mime)
        web.header('Content-disposition', 'attachment; filename=' + f.name)
        data = ''
        with open(os.path.join(config.UPLOAD_DIRECTORY, f.filename)) as f:
            data = f.read()
        return data
示例#6
0
文件: main.py 项目: Paaskehare/upl.so
    def GET(self, base):
        f = get_file(base)
        if not f: return app.notfound()

        metafile = f.metafile()

        if metafile:
            return render_plain.render(metafile.template)(f, metafile)

        return render_plain.upload(f)