Last active
May 2, 2018 17:12
-
-
Save devloe/ce5600bd6a360c8ea4a31c0851a75176 to your computer and use it in GitHub Desktop.
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
const queryParams = "...........&type=ATTACHMENT&filename=" + fileName; | |
var xhttp = new XMLHttpRequest(); | |
xhttp.onreadystatechange = function() { | |
if (this.readyState == 4 && this.status == 200) { | |
// Action to be performed when the document is read; | |
} | |
}; | |
xhttp.open("PUT", "https://www.mediktor.com/dev/uploads/File.Upload?" + queryParams, true); | |
xhttp.setRequestHeader("Authorization", "Basic " + this.authCode); | |
xhttp.setRequestHeader("Content-Type", "application/octet-stream"); | |
xhttp.send(fileContent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment