Skip to content

S-Mondal/SecureFileRendering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SecureFileRendering

Installing

Install and update using pip:

$ pip install SecureFileRendering

A Simple Example

from SecureFileRendering import SecureFileRendering

app = Flask(__name__)
app.config['SECURE_ROUTE_STRING'] = "/test"
sfr = SecureFileRendering(app)

@app.route("/downloadpdf")
def test_pdf():
	path = "static/a.pdf"
	return sfr.securely_render_file(path)

@app.route("/downloadzip")
def test_zip():
	paths = ["static/a.pdf"]
	return sfr.securely_render_file(paths, many=True)

if __name__ == '__main__':
	app.run()

Dependencies

  • Flask-Session
  • Flask

Description

Mention any path of a file and render the file securely without exposing the folder structure. File will be downloaded with a secure link which can be accessed only once. Example: /test/12345678

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages