|
operation.RegisterAzure("<--accountName-->", "<--accountKey-->", "<--blobName-->"); operation.setBlobContainer("<--blobPath-->", "<--filePath-->");
|
|
let hostUrl = "http://localhost:62869/";
export default Vue.extend({
data() {
return {
ajaxSettings: {
url: hostUrl + "api/FileManager/FileOperations",
getImageUrl: hostUrl + "api/FileManager/GetImage",
uploadUrl: hostUrl + "api/FileManager/Upload",
downloadUrl: hostUrl + "api/FileManager/Download"
},
view: "Details"
};
},
provide: {
filemanager: [NavigationPane, DetailsView, Toolbar]
}
}); |
|
methods: {
SendRequest: function(args) {
var obj = { action: "read", path: "/", showHiddenItems: false, data: [] };
// Send the ajax request to the server containing selected files.
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
data: JSON.stringify(obj),
dataType: "json",
success: function(data) {
console.log(data);
document.getElementById("value").innerText = data;
},
error: function(xhr, err) {}
});
}
}, |
|
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="Content-Type" />
<add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
</customHeaders>
</httpProtocol>
</system.webServer> |