I am trying to upload an image to the server using the POST method, but it does not work. Here is the code:
VK.api('wall.getPhotoUploadServer', {}, function(data) { if (data.response) { upload_url = data.response.upload_url; //адрес для запроса alert( upload_url ); $.post( upload_url, {photo: 'http://zelenyar.ru/sites/default/files/styles/large/public/field/image/%D0%BE%D1%81%D0%B5%D0%BD%D1%8C.jpg' }, function(json) { hash = json.hash; alert( hash ); //не выводит }, 'json' ); } });