Hello,
i have created a html page with jquery funtions which is on the server in piwigio's root irectory. I am trying to upload a jpeg file that is located on the server "http://fotos.connectmymachine.com/DSC00492.JPG" into the Gallery. The image is accessible if I paste the url into the browser. I am logged on as admin user, but when I run the code below, I get:
"405 Error: The image (file) is missing"
Not sure what I am doing wrong?
Any help would be appreciated!
uploadimage = function() {
//alert("Hello");
$.ajax({
url: "http://fotos.connectmymachine.com/ws.php?format=json&method=pwg.images.addSimple",
type: "POST",
data: { image: "http://fotos.connectmymachine.com/DSC00492.JPG", category: "41"},
dataType: "json",
success: function (result) {
// Show status of Login attempt. Will fail is user or password is wrong
alert("Upload Status: " + result.stat)
},
//Throw error if method failed or some other error in the url
error: function (xhr, ajaxOptions, thrownError) {
alert("Error status: " + xhr.status + " Error: " + thrownError);
}
});
};
Thanks!
Alex
Piwigo version: 2.8.6
PHP version:
MySQL version:
Piwigo URL: http://fotos.connectmymachine.com
Offline