Closed Bug 885545 Opened 11 years ago Closed 11 years ago

Create Blobs for Contact photos in the VCF importer

Categories

(Firefox OS Graveyard :: Gaia::Contacts, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:backlog, b2g-v1.3T affected, b2g-v1.4 affected, b2g-v2.0 fixed)

RESOLVED FIXED
1.4 S6 (25apr)
tracking-b2g backlog
Tracking Status
b2g-v1.3T --- affected
b2g-v1.4 --- affected
b2g-v2.0 --- fixed

People

(Reporter: reuben, Assigned: sergi)

References

Details

(Whiteboard: permafail)

Attachments

(1 file, 2 obsolete files)

+++ This bug was initially created as a clone of Bug #878820 +++ The code currently saves them as strings. That doesn't work, and the strings will be ignored once bug 878820 is fixed. Blobs should be saved instead.
Depends on: 885546
Assignee: nobody → sergi.mansilla
In VCF, the `photo` field can have a URI value (for example of a gif file in some website). What would you suggest we do in that case? We can ignore it or we can try to retrieve the file, although that would make imports extremely slow and probably it is not a good security practice.
How slow would it be, and how often do vCard exporters output URLs instead of a text representation of the image? I think we should support it unless it makes things unbearably slow (that would surprise me).
Well, the slowness would obviously depend on the network. In case there is no network we would not be able to retrieve the pictures, to start with. Also, if the user is importing a big amount of data with many remote pictures, that could be a considerable amount of bandwidth, which we can't really assume the connection can handle.
Flags: needinfo?(reuben.bmo)
That's a good point about the bandwidth. I think we can ignore URLs for now.
Flags: needinfo?(reuben.bmo)
(In reply to Sergi Mansilla from comment #3) > Well, the slowness would obviously depend on the network. In case there is > no network we would not be able to retrieve the pictures, to start with. > Also, if the user is importing a big amount of data with many remote > pictures, that could be a considerable amount of bandwidth, which we can't > really assume the connection can handle. In that case pictures should downloaded in chunks as we do in other importers that follow a common architecture ...
Whiteboard: burirun1.3-2
Hi Sergi, shall this bug 970909 be considered a duplicate of this one? Thanks!
Flags: needinfo?(sergi.mansilla)
Hi Germán, Yeah, it should be considered a duplicate. Cheers!
Flags: needinfo?(sergi.mansilla)
Hi again, Sergi ;-) Could bug 961628 be another duplicate of this bug? If it is, please feel free to mark it or just confirm it and I'll do it :-) Thanks!
Forgot the need-info :-(
Flags: needinfo?(sergi.mansilla)
Hi Germán, I marked it as duplicate when I saw your message, and I forgot to clear the ni back then :P Thanks!
Flags: needinfo?(sergi.mansilla)
blocking-b2g: --- → 1.3?
We are not taking features at this point in the release, so not blocking.
blocking-b2g: 1.3? → backlog
This bug failed a test case in burirun1.4-1, but the tag was not added. Since it also fails burirun1.4-2 I am changing the tag to 'permafail'.
Whiteboard: burirun1.3-2 → permafail
Attached file Github Pull Request (obsolete) —
This patch adds support for parsing vCard format photos in its standard base64 and URL forms. Besides the parsing process itself, the main change is that the vCard processing becomes callback based because of the potential asynchronous nature of retrieving photos from URLs. This patch also addresses some minor bugs found along the way.
Attachment #8395608 - Flags: review?(francisco.jordano)
Comment on attachment 8395608 [details] [review] Github Pull Request Some comments on the PR, not blocking as I know that will be resolved ;) Thanks for the amazing work, we are getting there with vcard!
Attachment #8395608 - Flags: review?(francisco.jordano) → review+
Fixed reviewer's comments and commited to master at 7f7f77278c60bc76949bc34293464b0e305fc839
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Depends on: 989306
This was backed out for causing bug 989306. Note the issue only reproduced when building with PRODUCTION=1. You should see this with: PRODUCTION=1 make reset-gaia, FTU will fail to load. https://github.com/mozilla-b2g/gaia/commit/8ad27d2f7d8b26d5d7551f232ce4a3650bcc1503
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached file Github pull request (obsolete) —
Requesting a review again. The issue that made this patch to be backed out has been addressed. The problem was the use of 'require' in vcard_parser.js. `require` does not exist in this context and made everything crash. Now the file mimemapper.js is loaded in the settings.html file inside contacts, as it should be. Tested on the phone with both development and production builds, and checked that all unit tests pass as well.
Attachment #8395608 - Attachment is obsolete: true
Attachment #8401883 - Flags: review?(francisco.jordano)
Comment on attachment 8401883 [details] [review] Github pull request This is not mergeable probably cause bug 990002 landed. We move a lot of the importers code to shared and that's the reason. Please flag me again for review when rebased (should be simple). Thanks!
Attachment #8401883 - Flags: review?(francisco.jordano)
Attached file Pointer to PR 18130
Had to rebase Sergi's code and also found some problems with the 'require'. I already reviewd this, but since I had to change it a bit, will ask for a second opinion from Jose.
Attachment #8401883 - Attachment is obsolete: true
ETA for the review is tomorrow Apr 12
Comment on attachment 8404043 [details] [review] Pointer to PR 18130 Hi Francisco, I left several substantive comments on GH. I think we need another round thanks!
Attachment #8404043 - Flags: review?(jmcf)
Comment on attachment 8404043 [details] [review] Pointer to PR 18130 Second round, tried to fix the appointed comments. Thanks!
Attachment #8404043 - Flags: review?(jmcf)
Comment on attachment 8404043 [details] [review] Pointer to PR 18130 LGTM The only issue is photo thumbnails but that will be done in a follow-up thanks Francisco!
Attachment #8404043 - Flags: review?(jmcf) → review+
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.4 S6 (25apr)
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: