0

When I deploy and try to download then its says file not found

  Error: Ajax error for /Areas/Client/UploadedFiles/2327/Driveshaft.dwg : 404 Not Found

Failed to load resource: the server responded with a status of 404 (Not Found)

When I upload jpq or pdf its works fine but .dwg file giving error

the file is exist and it says not found. maybe because of .dwg format.

function zipFiles(file_paths, zipFileName, id) {
var zip = new JSZip();
var count = 0;   
file_paths.forEach(function (url) {
    JSZipUtils.getBinaryContent(url, function (err, data) {
        if (err) {
            //throw err;
            showNotification(err);
        }
        count++;
        if (data != null) {
            zip.file(url, data, { binary: true });

            if (count == file_paths.length) {
                debugger
                zip.folder('' + uploadedDirectory+'' + id+'/')
                    .generateAsync({ type: 'blob' }).then(function (content) {
                        debugger

                        saveAs(content, zipFileName);
                    });
            }
        }
    });
});

}

Error: Ajax error for filepath : 404 Not Found

Nipun Tharuksha
  • 2,496
  • 4
  • 17
  • 40
Asif Ahmed
  • 23
  • 6

1 Answers1

0

If you cannot open the file directly in the web browser then it's probably a configuration "error" server side. Dwg is an unusual mimetype so it's probably not enabled by default on your web server. If your host is a iis server see ERROR 404.3 Not Found for JSON file to add a new mimetype. For dwg I think it's "image/vnd.dwg" but I'm not 100% sure.

frenchone
  • 1,547
  • 4
  • 19
  • 34