FirefoxLite icon indicating copy to clipboard operation
FirefoxLite copied to clipboard

Can't download base64 image

Open buddybuild[bot] opened this issue 9 years ago • 4 comments

Buddybuild detected a crash app/src/main/java/org/mozilla/focus/fragment/BrowserFragment.java line 499


                download.getUrl(), download.getContentDisposition(), download.getMimeType());

        final String dir = download.getDownloadType() == Download.TYPE_IMAGE
                ? Environment.DIRECTORY_PICTURES
                : Environment.DIRECTORY_DOWNLOADS;
        final DownloadManager.Request request = new DownloadManager.Request(Uri.parse(download.getUrl())) <-- CRASHED
                .addRequestHeader("User-Agent", download.getUserAgent())
                .addRequestHeader("Cookie", cookie)
                .addRequestHeader("Referer", getUrl())
                .setDestinationInExternalPublicDir(dir, fileName)
                .setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED)

View File | View Full Crash Details

buddybuild[bot] avatar Aug 21 '17 05:08 buddybuild[bot]

Invalid uri for downloadmanager

URIs: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABC0lEQVQYlTXPPUsCYQDA8b/e04tdQR5ZBpE3NAR6S0SDVDZKDQ2BY9TUy1foE0TQ1Edo6hOEkyUG0QuBRtQgl0hnenVdnZD5eLbU7xv8Avy5X16KhrQBg47EtpziXO6qBhAEeNEm0qr7VdBcLxt2mlnNbhVu0NMAgdj1wvjOoX2xdSt0L7MGgx2GGid8yLrJvJMUkbKfOF8N68bUIqcz2wQR7GUcYvJIr1dFQijvkh89xGV6BPPMwvMF/nQXJMgWiM+KLPX2tc0HNa/HUxDv2owpx7xV+023Hiwpdt7yhmcjj9/NdrIhn8LrPVmotctWVd01Nt27wH9T3YhHU5O+sT/6SuVZKa4cNGoAv/ZMas7pC/KaAAAAAElFTkSuQmCC

mTwTm avatar Sep 01 '17 07:09 mTwTm

Revisit this in triage since the blocking is handled in #605 but we might still want to support this later.

mTwTm avatar Sep 05 '17 10:09 mTwTm

for 1st release, when it comes to base64 image download, zerda wouldn't download. Pop a toast message: "file type not supported"

chianger avatar Sep 06 '17 03:09 chianger

Label help wanted since we want to download base64 images if possible.

mTwTm avatar Jan 28 '19 08:01 mTwTm