Failed to load resource: Frame load interrupted - Agian

前端 未结 2 747
不知归路
不知归路 2021-01-18 00:12

I have code which downloads a picture from a fake link. I have looked at others comments / sites but nothing has helped me find the solution to the annoying :

\"Fail

相关标签:
2条回答
  • 2021-01-18 00:23
    header("Pragma: public"); // required
    header("Expires: 0"); 
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); 
    header("Cache-Control: private",false); // required for certain browsers 
    header("Content-type: application/x-unknown"); // I always use this
    header("Content-Disposition: attachment; filename='theFilename.ext'");
    header("Content-Transfer-Encoding: binary");
    header("Content-Length: 177998"); // you might want to set this
    readfile('/the/url/to/theFilename.ext');
    

    This will work ;-)

    0 讨论(0)
  • 2021-01-18 00:41

    Okay, so through a convo's with vimeo, and figuring out that the problem was due to Content-Disposition: attachment. They told me this is an issue that is inherit with browsers. You are not supposed to use a different DNS for loading resources, so it will work but the browsers won't be happy about it.

    0 讨论(0)
提交回复
热议问题