Closed Bug 949945 Opened 11 years ago Closed 7 years ago

[B2G][Helix][Browser][Gallery] use new File([blob], filename) to return a blob with filename when picking

Categories

(Firefox OS Graveyard :: Gaia::Gallery, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX
1.4 S3 (14mar)

People

(Reporter: johnhu, Assigned: pdahiya)

References

Details

(Whiteboard: [priority])

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #920905 +++ When handling pick activity, we need to use new File([blob], filename) to return a blob with readable file name. Although we won't have image editor in pick activity from browser, it still has other cases that we should return a blob with its original filename.
Blocks: 920905
No longer depends on: 920905
No longer depends on: 949941
No longer blocks: 949944
No longer blocks: 949943
nominate it as 1.3? since its original bug is 1.3?.
blocking-b2g: --- → 1.3?
Assignee: nobody → johu
The patch is finished but there may be a bug in FilePicker.js. So, this patch is not tested correctly.
Lets make sure we fix all the apps affected and get this in the next train (1.4). Not blocking it for 1.3 (if folks think otherwise, we can revisit 1.3 blocker status) blocking-b2g: 1.3? → 1.4?
blocking-b2g: 1.3? → 1.4?
The gecko patch is in bug 949944.
Depends on: 949944
Comment on attachment 8347934 [details] [review] use new file to create blob with correct file name Use new file to return a named blob and add the name field to the activity result.
Attachment #8347934 - Flags: review?(dflanagan)
Comment on attachment 8347934 [details] [review] use new file to create blob with correct file name r- because I think most of the time the call to new File() will not be necessary. I'd put it in getCroppedRegionBlob() instead.
Attachment #8347934 - Flags: review?(dflanagan) → review-
Comment on attachment 8347934 [details] [review] use new file to create blob with correct file name Thanks for your review. I had update the patch to address your concerns. I prefer put it in the cropAndEndPick which is in gallery.js because we don't need to guarantee that getCroppedRegionBlob always returns a file.
Attachment #8347934 - Flags: review- → review?(dflanagan)
Comment on attachment 8347934 [details] [review] use new file to create blob with correct file name r+, assuming you've tested this. But see my query on github about whether we should change the filename if we change the type of the file when cropping it.
Attachment #8347934 - Flags: review?(dflanagan) → review+
Johu, If needed Punam can take this, test and land it. Please let us know. Thanks Hema
Target Milestone: --- → 1.4 S3 (14mar)
Thanks Hema, That will be great if Punam can take this one. I am currently busy on TV things. I feel David's suggestion in Github is correct. Although David gives me r+, I think my patch is not good enough to land. The insufficient part is that my patch returns wrong mime type. When user wants pick a "png" image, we only can provide jpg format while cropping. I know there is no cropping feature in file picker case. But the patch should take care all of the cases.
Assignee: johu → nobody
blocking-b2g: 1.4? → 1.4+
Assignee: nobody → pdahiya
Hi David I have updated John's patch with your suggestion in Comment #8 to change the filename if we change the type of the file when cropping it. I have also added my findings in the discussion https://github.com/mozilla-b2g/gaia/pull/14696#discussion-diff-9659497R863 Please review the attached patch. Thanks
Attachment #8347934 - Attachment is obsolete: true
Attachment #8383805 - Flags: review?(dflanagan)
This is a good idea to fix, but I don't think we would hold a release on this. We've shipped with this bug in multiple releases historically.
blocking-b2g: 1.4+ → 1.4?
This is not a blocker for 1.4 Punam worked on it and a patch is in review (but lowest in the review priority stack compared to all the other 1.4 work) thanks hema
blocking-b2g: 1.4? → ---
Whiteboard: [priority]
We may not want to land this patch at all given this: https://bugzilla.mozilla.org/show_bug.cgi?id=985167#c12 It looks like using the File() constructor around memory-backed blobs turns out to be a really bad idea....
Comment on attachment 8383805 [details] [review] PR with the fix for Bug 949945 As per comment#14, removing the review request on the patch
Attachment #8383805 - Flags: review?(dflanagan)
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: