Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Downloaded images from Twitter or Google Images save with .bin format #3516

Closed
ekager opened this issue Jun 24, 2019 · 2 comments
Closed

Downloaded images from Twitter or Google Images save with .bin format #3516

ekager opened this issue Jun 24, 2019 · 2 comments
Assignees
Labels
blocked Blocked pull requests and issues 🐞 bug Something isn't working <download> Component: feature-download P1
Milestone

Comments

@ekager
Copy link
Contributor

ekager commented Jun 24, 2019

Copied from: mozilla-mobile/fenix#3624

Also see: mozilla-mobile/fenix#2809

Same bug in Focus that a contributor tried to fix IIRC:
mozilla-mobile/focus-android#2743


Steps to reproduce

  1. Go to twitter.com
  2. Long tap on an image and save image.

Expected behavior

The image has a .jpg file format.

Actual behavior

The image has a .bin file format. A saved image from Wikipedia articles is saved with .jpg file format.

Device information

  • Android device: ?
  • Fenix version: 1.0.1926 (#11750611)

Note

Bug filed from webcompat/web-bugs#33424

┆Issue is synchronized with this Jira Task

@ekager ekager added the <download> Component: feature-download label Jun 24, 2019
@ekager ekager changed the title Downloaded files from Twitter save with .bin format Downloaded images from Twitter or Google Images save with .bin format Jun 24, 2019
@pocmo pocmo added the 🐞 bug Something isn't working label Jun 24, 2019
@bifleming bifleming added the P1 label Jun 24, 2019
@Amejia481 Amejia481 self-assigned this Jun 24, 2019
@Amejia481
Copy link
Contributor

The issue here is that on some images on Twitter, we're not getting the file extension as part of the end of the URL, it is been passed as a parameter of the query string https://pbs.twimg.com/media/D964pzzX4AASSIz?format=jpg&name=4096x4096. For those edge cases, we could to perform an HTTP HEAD request on the URL to figure out the mime type.

This could add extra overhead to what we are doing now, an optimal solution is to wait for the Gecko-based DownloadManager and #1968 add the file extension when we have downloaded the file.

Depends on: #1968

@Amejia481 Amejia481 added the blocked Blocked pull requests and issues label Jun 25, 2019
NotWoods added a commit to NotWoods/android-components that referenced this issue Jul 18, 2019
NotWoods added a commit to NotWoods/android-components that referenced this issue Jul 19, 2019
@ekager
Copy link
Contributor Author

ekager commented Jul 19, 2019

Came here to bump this because someone reached out that this is their number one annoyance but see that @NotWoods is already making commits 🙌 😆

NotWoods added a commit to NotWoods/android-components that referenced this issue Jul 19, 2019
@pocmo pocmo added this to the 5.0.0 🍃 milestone Jul 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked Blocked pull requests and issues 🐞 bug Something isn't working <download> Component: feature-download P1
Projects
None yet
Development

No branches or pull requests

4 participants