[Webkit-unassigned] [Bug 197441] New: Blob downloads stopped working

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 30 15:58:28 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=197441

            Bug ID: 197441
           Summary: Blob downloads stopped working
           Product: WebKit
           Version: Safari 12
          Hardware: Macintosh
               URL: https://packfrog.com/test.php
                OS: All
            Status: NEW
          Severity: Major
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: rollofone at gmail.com
                CC: cdumez at apple.com

Our web-service generates downloadable files by assembling binary blocks into blobs which are made downloadable via "a href" and download attribute. This works fine on all browsers (Chrome, Firefox, Epiphany (WebKit 2.18.6) and it used to work in Safari. However - it doesn't work anymore for Safari version 12.1 (14607.1.40.1.4). Instead of downloading the data, Safari opens a new tab and displays the "WebKitBlobResource error 1 . We're using no frames, no target attribute and even with target="_self" , the error occurs.

After an exhausting search we traced the error to 

--- Pseudo-Code - WILL NOT WORK IN CURRENT SAFARI

function
prepare(blob)
{
   var URL = window.URL || window.webkitURL;
   var image = URL.createObjectURL(blob);
   showDownload(image)
}

function
showDownload(i)
{
   $('#link').prop('href',i);
   $('#link').attr('download',"name.jpg")
}

--- Pseudo-Code - WORKS IN CURRENT SAFARI

var URL = window.URL || window.webkitURL;

function
prepare(blob)
{
   var image = URL.createObjectURL(blob);
   showDownload(image)
}

function
showDownload(i)
{
   $('#link').prop('href',i);
   $('#link').attr('download',"name.jpg")
}


---- END OF PSEUDOCODE

See https://packfrog.com/test.php for details

In other words: If the variable "URL" is declared globally, the process works as expected. This leads to the conclusion that the reference to window.webkitURL is deleted or no longer available when function "prepare" is terminated. This seems to be incorrect. It should also not just open a tab but generate a meaningful error message.

Michaela

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190430/b6e6d2bb/attachment.html>


More information about the webkit-unassigned mailing list