Flask AutoIndex Show only folders and PDF's

Viewed 95
from flask import Flask 
from flask_autoindex import AutoIndex
from waitress import serve

app = Flask(__name__)


ppath = 'S:/Forms/MCX/mcx/'

AutoIndex(app, browse_root=ppath)


if __name__ == "__main__":
    serve(app, host='10.0.1.110', port=8000)

I am new to coding and I am using this to serve files on our work server so that the employees can access the files easliy from their phones. The problem is I want them to only be able to view the folders and .PDF file types. How can i adjust this to only show those things and not all the other files?

0 Answers
Related