Le 13/11/2015 18:35, Josh Smith a écrit :
> As an editor developer, I have often desired a standardized "open"
> activity. That way, it would be easier to integrate with 3rd-party
> file browsers.
>
> IMO the "open" activity should possess at least these parameters:
> - type: the file's mimetype
> - blob: the file's contents
> - filename: optional string; the file's full name (e.g. "test.docx")
> - readonly: optional boolean; whether the editor can make changes

We already have type, blob, filename :) We have "allowSave" to hint the
receiver that we can save that blob locally, otherwise we usually don't
allow it. "readonly" is a good addition IMO.

>
> If we want to make the activity really powerful, it could pass a File
> or FileHandle object. This would allow the editor to access file
> attributes and read it properly
> (https://developer.mozilla.org/docs/Web/API/FileReader). In this case,
> we could omit all other parameters (except possibly readonly).

I'm not sure but I think it could already work -- but then all consumers
would need to follow this behavior. I think it's much easier to just
follow this simple interface.


>
> --
> Joshua Smith
> Plinth Laboratories
>
> On Fri, Nov 13, 2015 at 8:35 AM, Tfe Server <[email protected]
> <mailto:[email protected]>> wrote:
>
>     Hello all,
>
>     (Sorry if i didn't post the message in the right place)
>
>     I am reading the MozActivity API, and i didn't find the way to
>     open an external editor, and fetch the result when done.
>
>     The goal is to open a MozActivity with a blob, and get the result
>     to save it to a cloud storage.
>
>     Maybe someone here has an idea for this problem?
>
>     Thanks for your help,
>
>     --
>     tfe
>
>
>
>
>     _______________________________________________
>     dev-fxos mailing list
>     [email protected] <mailto:[email protected]>
>     https://lists.mozilla.org/listinfo/dev-fxos
>
>
>
>
> _______________________________________________
> dev-fxos mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-fxos

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dev-fxos mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-fxos

Reply via email to