-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix Controller SaveToFile remove all temp file
- Loading branch information
Showing
6 changed files
with
143 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<template> | ||
<Container> | ||
<div class="content"> | ||
<h1> | ||
Upload files | ||
</h1> | ||
<div class="forms"> | ||
<FileForm v-bind:files="files['Model']" name="Model" v-on:upload="upload_model" v-on:submit="submit_model"> | ||
</FileForm> | ||
</div> | ||
</div> | ||
</Container> | ||
</template> | ||
|
||
<script> | ||
import axios from 'axios' | ||
import Container from '@/components/Container.vue' | ||
import FileForm from '@/components/FileForm.vue' | ||
|
||
export default { | ||
name: 'App', | ||
data: function() { | ||
return { | ||
files: {}, | ||
} | ||
}, | ||
components: { | ||
Container, | ||
FileForm | ||
}, | ||
methods: { | ||
upload_model: function(file) { | ||
this.files['Model'] = file | ||
}, | ||
submit_model: function() { | ||
let formData = new FormData(); | ||
formData.append('Model', this.files['Model']); | ||
axios.put('http://' + document.location.host + '/api/upload_model', formData) | ||
} | ||
}, | ||
mounted () { | ||
|
||
} | ||
} | ||
</script> |
This file contains 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