MIME Type Warning Causing a Damaged Image on a Website

Here is an example of the problem page:

http://estorkdelivery.com/template/view/69

Our website serves to preview the template. When you enter text information and exit the field, the website serves to preview the image with the text added to the field.

When the server returns this image:

http://estorkdelivery.com/file/preview/verify_token:149505eb811f8856a12ec6e71e2932f082a97edf

My console displays the following message:

The resource is interpreted as an image, but is transmitted with the MIME / html text type: http://estorkdelivery.com/file/preview/verify_token:149505eb811f8856a12ec6e71e2932f082a97edf

Trying to cover all the databases, I checked that the following MIME types are installed on the server:

application/x-javascript.js

image/jpeg jpeg jpg jpe

image/png png

, . , - . ?

!

04/27/2012. , . , - , , ? , StackOverflow, - . , . .

+3
1

, , ; AJAX verify_token, . , JavaScript, .

:

new $._iframeUpload(form, {
  success: function(response)
  {
    $('.preview').attr('src', 'http://estorkdelivery.com/file/preview/verify_token:' 
        + response.verify_token);
    var image = new Image();
    image.src = 'http://estorkdelivery.com/file/preview/verify_token:' 
        + response.verify_token;
    image.onload = function()
    {
      $queue--;
      if ($queue <= 0)
        $('.updating').hide();
    };
  }
}); 

, Image img. JavaScript, ( onload):

new $._iframeUpload(form, {
  success: function(response)
  {
    var image = new Image();
    image.onload = function()
    {
      $('.preview').attr('src', image.src);
      $queue--;
      if ($queue <= 0)
        $('.updating').hide();
    };
    image.src = 'http://estorkdelivery.com/file/preview/verify_token:' 
        + response.verify_token;
  }
}); 

, .

, , . - 700 x 500, , , - 2900 x 2100! AJAX , . , .

0

All Articles