Closed Bug 920905 Opened 11 years ago Closed 10 years ago

[B2G][Helix][Browser]The attachment name is error when it is uploaded to website.

Categories

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

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lecky.wanglei, Assigned: baku)

References

Details

Attachments

(3 files)

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; aff-kingsoft-ciba; .NET4.0C; .NET4.0E)

Steps to reproduce:


gaia:8059864bd278645ab5d2598b5ed595154136c253
gecko:0265cd51b4dc64ca100353482ada2025df6f5f53
gonk-misc:ca9192d7ef6037016d4723647d86b72f7a410633



Actual results:

【Test Steps】
1、Login a email website. such as http://m.mail.163.com
2. write a email
3. add attachment such as mp3, jpg and so on.

【Expect Result】
1、The real attachment name is displayed.
【Real Result】
1、The attachment name is displayed as 'blob.mp3' or 'blob.jpg'.
【Restore Steps】No
【probabilty】5/5
Attached file screenshot
Severity: normal → blocker
Priority: -- → P2
Flags: needinfo?(wchang)
Flags: needinfo?(ahuang)
Flags: needinfo?(ehung)
Hi evelyn&wayne:

We think this issue are a bug of gaia, could you help us to dispacth it , thanks!
Hi evelyn&wayne:

We think this issue are a bug of gaia, could you help us to dispacth it , thanks!
I can reproduce it on v1.1 but I can't open a file chooser on v1.2.

Yes, it might because the web activity handle by Wallpaper and Camera return blob files, and set the name incorrectly.

not a blocker, I think.
Flags: needinfo?(ehung)
Flags: needinfo?(ahuang)
hi Evelyn
  Will you solve this issue on your master branch? If you will do, could you release the patch to us?
Hi beatriz:
Could you help us to confirm that Telefonica would accept this issue?
Flags: needinfo?(brg)
I would recommend this be reviewed for koi as it somehows breaks a web experience.

koi?'ing to get attention.
blocking-b2g: --- → koi?
Flags: needinfo?(wchang)
(In reply to Wayne Chang [:wchang] from comment #7)
> I would recommend this be reviewed for koi as it somehows breaks a web
> experience.
> 
> koi?'ing to get attention.
Not blocker but agree to nominate to koi+ so we can investigate it further. Thanks.
Flags: needinfo?(brg)
As in triage (10/2), please investigate.
Flags: needinfo?(overholt)
blocking-b2g: koi? → koi+
Andrea, this appears to be an <input type=file> bug.  Followup to bug 832923 comment #26 (Jonas' suggestion)?
Assignee: nobody → amarchesini
Flags: needinfo?(overholt)
Component: Gaia::Browser → DOM
Product: Boot2Gecko → Core
Version: unspecified → Trunk
Looks like input=file is generally broken on 1.2 right now. See bug 923274.
Depends on: 923274
I implemented something that uses the filename from a DOMFile. But most of the apps send DOMBlob generated by canvas. For instance: wallpaper and gallery (when the image is cropped). These apps have to send a DOMFile instead a DOMBlob.
Sounds like the solution here is to fix bug 819900. Then use something like:

croppedfile = new File(croppedBlob, originalFile.name);

in the various apps that are returning Blobs rather than Files.

The above syntax is in spec these days.
Depends on: 819900
blocking-b2g: koi+ → koi?
David, can you take a look at this once bug 819900 is fixed. Should be mostly fixing the gallery app, as well as any other app that creates nameless Blobs when returning WebActivity results.
Assignee: amarchesini → dflanagan
(In reply to Jonas Sicking (:sicking) Please ni? if you want feedback from comment #14)
> David, can you take a look at this once bug 819900 is fixed. Should be
> mostly fixing the gallery app, as well as any other app that creates
> nameless Blobs when returning WebActivity results.

To my understanding, I don't think the fix here would only involve the gallery app. It would involve any valid core Gaia app that can handle the pick activity with input=file. I think that includes music & video apps at a minimum as well.
Moving to 1.3, please track for the release.
blocking-b2g: koi? → 1.3?
This should be moved from DOM to Firefox OS somewhere.  I'll start with the gallery.
Component: DOM → Gaia::Gallery
Product: Core → Firefox OS
Version: Trunk → unspecified
Agree with Jason, I suggest to split this bug as three bugs for each app.

(In reply to Jason Smith [:jsmith] from comment #15)
> To my understanding, I don't think the fix here would only involve the
> gallery app. It would involve any valid core Gaia app that can handle the
> pick activity with input=file. I think that includes music & video apps at a
> minimum as well.
Wallpaper app should be also included.
Steal this bug form djf.
Assignee: dflanagan → johu
According to comment 14, we need to check all the status of all apps:

After some code checking, the affected apps are:
1. camera: affected, it may resize image if the image is too large and the image blob is returned by camera.
2. gallery: not affected, bug 915001 disables the cropping tool in pick activate.
3. music: not affected, it returns a file from DeviceStorage as its picking result.
4. ringtone: affected, it downloads the ringtone by XHR
5. video: not affected, it returns a file from DeviceStorage as its picking result.
6. wallpaper: affected, it creates the blob from canvas.
Attached image pick video
Andrea,

To write the patch for camera, I found the new File() doesn't make the input field shows the correct filename. I had tested with camera app with patched and video app which returns a File object returned by DeviceStorage. The UI still shows blob.3gpp. Is there anything I missed?

I am using mater to test it.
Flags: needinfo?(amarchesini)
Attached patch patchSplinter Review
I tested this patch on a device. the basic idea is:

1. if the message contains a 'name' property, that will be used.
2. if the blob is a DOMFile, blob.name is used.
3. if 1 or 2 succeeded, then it tries to take the filename only and not the full patch.
4. if something failed, blob.extension is used as fallback.
Attachment #8346527 - Flags: review?(fabrice)
Flags: needinfo?(amarchesini)
Attachment #8346527 - Flags: review?(fabrice) → review+
Keywords: checkin-needed
can you please check if comment 23 makes sense to you and if your changes in gaia match with it? Thanks!
Flags: needinfo?(johu)
Andrea,

Cool. comment 23 makes sense. Since the patch is inbound, I will wait one day to have it in master. Thanks for that, Andrea.
Flags: needinfo?(johu)
https://hg.mozilla.org/mozilla-central/rev/638f72f30d5e
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
This bug isn't finished. It lacks some gaia patches, see comment 21.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: FIXED → ---
No longer blocks: 949941
Depends on: 949941
No longer blocks: 949943, 949944, 949945
Depends on: 949943, 949944, 949945
Assignee: johu → amarchesini
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?
johnhu, can we close this bug?
Flags: needinfo?(johu)
Yes, I think we can close it. I had moved the others out of this bug. Sorry for blocking that.
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Flags: needinfo?(johu)
Resolution: --- → FIXED
blocking-b2g: 1.4? → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: