Fix file loading

master
Dan Howe 5 years ago
parent fb2e185b53
commit 4f57f9d607

@ -152,24 +152,24 @@ def parse_contents(contents, filename, date):
return elements return elements
@app.callback(Output('output-data-upload', 'children'), [ @app.callback([Output('output-data-upload', 'children')], [
Input('upload-data', 'contents'), Input('upload-data', 'contents'),
Input('upload-data', 'filename'), Input('upload-data', 'filename'),
Input('upload-data', 'last_modified') Input('upload-data', 'last_modified'),
]) ])
def update_output(list_of_contents, list_of_names, list_of_dates): def update_output(contents, names, dates):
if list_of_contents is not None: if contents is not None:
children = [ children = [
parse_contents(c, n, d) parse_contents(c, n, d) for c, n, d in zip(contents, names, dates)
for c, n, d in zip(list_of_contents, list_of_names, list_of_dates)
] ]
return children return children
def main(): def main():
port = 8050 port = 8050
wb.open('http://localhost:{}'.format(port)) wb.open('http://localhost:{}'.format(port))
app.run_server(port=port, debug=False) app.run_server(port=port, debug=True)
if __name__ == '__main__': if __name__ == '__main__':

Loading…
Cancel
Save