This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The file input element | |
*/ | |
<input type="file" className="hidden" | |
multiple={false} | |
accept=".json,.csv,.txt,.text,application/json,text/csv,text/plain" | |
onChange={evt => this.openFile(evt)} | |
/> | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The React.JS code for the download method: | |
const blob = new Blob([output]); // Step 3 | |
const fileDownloadUrl = URL.createObjectURL(blob); // Step 4 | |
this.setState ({fileDownloadUrl: fileDownloadUrl}, // Step 5 | |
() => { | |
this.dofileDownload.click(); // Step 6 | |
URL.revokeObjectURL(fileDownloadUrl); // Step 7 | |
this.setState({fileDownloadUrl: ""}) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# The default apis server | |
# This file is in dirextory conf.d | |
server { | |
listen 82 default_server; | |
server_name _; | |
access_log /var/log/nginx/apis.log main; | |
# Load configuration files for the default server block. |