Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. submit () {
  2. console.log(this.banners)
  3. const banners = new FormData()
  4. banners.append('banners', this.banners)
  5. this.$axios.post(api.insertBanner, banners).then(response => response.data)
  6. .catch(error => {
  7. console.log(error)
  8. })
  9. },
  10.  
  11. public async Task<ActionResult> Post(BannersDTO banners)
  12.  
  13. public class BannersDTO
  14. {
  15. public Microsoft.AspNetCore.Http.IFormFile Files { get; set; }
  16. public string TermoOrSku { get; set; }
  17. public bool InserirImediato { get; set; }
  18. public string DataAtivacao { get; set; }
  19. public string DataVigencia { get; set; }
  20. }
  21.  
  22. public async Task<ActionResult> Post(Microsoft.AspNetCore.Http.IFormFile Files)
  23.  
  24. banners.append('files', this.banners.files)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement