Closed Bug 1580838 Opened 6 years ago Closed 6 years ago

FileLink WebExtensions API Enhancements and Bugfixes.

Categories

(Thunderbird :: Add-Ons: Extensions API, enhancement)

enhancement
Not set
normal

Tracking

(thunderbird_esr6870+ fixed, thunderbird71 fixed)

RESOLVED FIXED
Thunderbird 71.0
Tracking Status
thunderbird_esr68 70+ fixed
thunderbird71 --- fixed

People

(Reporter: diegocr, Assigned: darktrojan)

References

(Regression)

Details

Attachments

(2 files)

I am attaching a patch to address the issues highlighted in https://bugzilla.mozilla.org/show_bug.cgi?id=1481052#c64

I.e. it does:

  1. Fixes the error handling loading files.

  2. Allow FileLink extensions to get a File instance instead of loading the file's contents for them.

Any mentor who would like to check this out? Not sure if that's the correct way to submit patches here.

Assignee: nobody → dcasorran
Comment on attachment 9092356 [details] [diff] [review] handle errors loading files, and allow to passthrough File instances. I suspect Geoff is the best person to look at this.
Attachment #9092356 - Flags: review?(geoff)
Comment on attachment 9092356 [details] [diff] [review] handle errors loading files, and allow to passthrough File instances. This is going to need some more work to get the test and schema updated, but on the whole I'm pretty happy with the idea. Would you like me to take it from here?
Flags: needinfo?(dcasorran)
Attachment #9092356 - Flags: review?(geoff) → feedback+

Sure, feel free to take over. I do assume that's the faster way to get this shipped with the next TB version. Thanks!

Flags: needinfo?(dcasorran)
Assignee: dcasorran → geoff
Status: NEW → ASSIGNED
Attachment #9095396 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9095396 [details] [diff] [review] 1580838-cloudfile-as-file-1.diff Review of attachment 9095396 [details] [diff] [review]: ----------------------------------------------------------------- ::: mail/components/extensions/parent/ext-cloudFile.js @@ +18,5 @@ > let blob = await File.createFromNsIFile(nsifile); > > return new Promise((resolve, reject) => { > let reader = new FileReader(); > + reader.addEventListener("loadend", ev => { nit: slightly unusual name. Please use e or event
Attachment #9095396 - Flags: review?(mkmelin+mozilla) → review+

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/b1480206231d
Add option to CloudFile API to get files as File objects instead of ArrayBuffer; r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED

Thanks for your patch, Diego!

Target Milestone: --- → Thunderbird 71.0

You are welcome, i would also like to leave the door open for possible further enhancements :)

If you find anything you'd like to improve, we're always interested in patches ;)

Yeah, that's what i meant, it's very possible that i will submit further patches :)

Comment on attachment 9095396 [details] [diff] [review] 1580838-cloudfile-as-file-1.diff I'd like this to be in ESR after some time on beta.
Attachment #9095396 - Flags: approval-comm-esr68?

I'd like this to be in ESR after some time on beta.

What do I make of that? Shipping TB 71 beta now/tomorrow/the day after (26th Oct 2019?). We'll do 68.2.1 maybe in the week after. Is that too early?

Flags: needinfo?(geoff)

Assuming there are no problems reported I'm okay with it being in 68.2.1.

Flags: needinfo?(geoff)
Attachment #9095396 - Flags: approval-comm-esr68? → approval-comm-esr68+

TB 68.2.1 ESR:
https://hg.mozilla.org/releases/comm-esr68/rev/bae5514de050c3168cb4bfe36b9c5ebf6acfeeff

This needed rebasing. I ended up landing it without the ExtensionTestUtils.failOnSchemaWarnings() stuff.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: