Home GET http 403 forbidden (adding pictrues with AJAX)
Reply: 0

GET http 403 forbidden (adding pictrues with AJAX)

user2986 Published in April 22, 2018, 4:55 am

I have a problem: after uploading files (via FileZilla) to the server, I do not get photos, and the console throws an error GET http://...... 403 (Forbidden) [console error image]

"galleryEach.js" script is responsible for downloading photos from folders and then uploading them to a specific div

Here is galleryEach.js code I use:

const name=[['bledow', 'Dom w Błędowie'],
            ["czestochowa-lo", "III LO Częstochowa"],
            ["dabrowa-zielona", "Dworek w Dąbrowie Zielonej"],
            ["gliwice", "Gliwice"],
            ["inne", "Inne realizacje"],
            ["kamienica-czestochowa", "Kamienica Częstochowa"],
            ["kamienica-siewierz", "Kamienica w Siewierzu"],
            ["klobuck","Dom w Kłobucku"],
            ["lazy","Dom w Łazach"],
            ["maslonskie","Dom Masłońskie"],
            ["myszkow","Dom w Myszkowie"],
            ["ogrodzieniec","Dom w Ogrodzieńcu"],
            ["ogrodzieniec-2","Dom w Ogrodzieńcu(2)"],
            ["podzamcze","Dom w Podzamczu"],
            ["poreba","Dom w Porębie"],
            ["przeczyce","Dom w Przeczycach"],
            ["przedszkole-lazy", "Przedszkole w Łazach"],
            ["sarnow","Dom w Sarnowie"],
            ["siewierz","Dom w Siewierzu"],
            ["zawiercie","Dom w Zawierciu"],
            ["zawiercie-2","Dom w Zawierciu(2)"],
            ["zelislawice", "Dom w Żelisławicach"],
            ["zlotoryja","Złotoryja - blok mieszkalny"]];  

var counter=0;
function loadImg()
    var folder;

    folder = "/img/mini/"+name[counter][0]+"/";

    var folderGallery = folder.replace("mini", "gallery");


        url : folder,
        success: function (data) {

                $(data).find("a").attr("href", function (i, val) {
                if( val.match(/\.(jpe?g|png|gif|JPE?G)$/) ) { 
                    $("#foty").append( "<div class='gallery_product col-lg-4 col-md-4 col-sm-6 col-xs-6 filter "+name[counter][0]+"'><a href='"+ folderGallery + val +"' data-lightbox='"+name[counter][0]+"' data-title='"+name[counter][1]+"'><img src='"+ folder + val +"'  width=300 height=300 title='"+name[counter][1]+"' data-title='"+name[counter][1]+"' class=' img-responsive gallery_image'></div>" );


        error: function() {
        complete: function() {







at the local XAMPP everything works fine.

Is this about file access rights? What should I do? How can I change them?

Can anyone help me?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.311575 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO