i want to send file to server.
it is a sample in the javascript:
Qt Code:
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script>
  5. function tabe(){
  6. var file = document.getElementById('files').files[0];
  7. var fd = new FormData;
  8. fd.append('photo',file);
  9. var xhr = new XMLHttpRequest();
  10. xhr.addEventListener('load', function(){
  11. alert(this.responseText);
  12. });
  13. xhr.open('post', 'get.php', true);
  14. xhr.send(fd);
  15. }
  16. </script>
  17. </head>
  18. <body>
  19. <form action="get.php" enctype="multipart/form-data" method="post">
  20. <input id="files" name="photo" type="file">
  21. <input type="button" value="آپلود فایل" onclick="tabe();">
  22. </form>
  23. </body>
  24. </html>
To copy to clipboard, switch view to plain text mode 
i want to do that in the qml.