Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8D6D6200D06 for ; Mon, 25 Sep 2017 14:22:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8C19B1609C4; Mon, 25 Sep 2017 12:22:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AAFF31609BB for ; Mon, 25 Sep 2017 14:22:06 +0200 (CEST) Received: (qmail 96832 invoked by uid 500); 25 Sep 2017 12:22:05 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 96821 invoked by uid 99); 25 Sep 2017 12:22:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Sep 2017 12:22:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 5DFF318408F for ; Mon, 25 Sep 2017 12:22:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_SHORT=0.001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id SPgqWiSvRTNP for ; Mon, 25 Sep 2017 12:22:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 4A2FA61286 for ; Mon, 25 Sep 2017 12:22:03 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 32F6EE01A8 for ; Mon, 25 Sep 2017 12:22:02 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6E5D12423A for ; Mon, 25 Sep 2017 12:22:00 +0000 (UTC) Date: Mon, 25 Sep 2017 12:22:00 +0000 (UTC) From: "sandstrom (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CB-13044) Update cordova-plugin-file to latest version of File API MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 25 Sep 2017 12:22:07 -0000 [ https://issues.apache.org/jira/browse/CB-13044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16178935#comment-16178935 ] sandstrom edited comment on CB-13044 at 9/25/17 12:21 PM: ---------------------------------------------------------- How about varying requirements per plugins? This plugin could make Android 5.1 the minimum requirement (a bit higher than the current platform-level requirement, which seems to be level 16 (4.1)). That way the implementation work discussed above would be easier. I think time is better spent advancing/improving Cordova (which is a great project) than spending time on a 5 year old Android (4.1 was released 2012 afaik). https://cordova.apache.org/docs/en/latest/guide/platforms/android/#requirements-and-support was (Author: sandstrom): How about varying requirements per plugins? This plugin could make Android 5.1 a requirement (a bit higher than the current platform-level requirement, which seems to be level 16 (4.1)). That way the implementation work discussed above would be easier. I think time is better spent advancing/improving Cordova (which is a great project) than spending time on a 5 year old Android (4.1 was released 2012 afaik). https://cordova.apache.org/docs/en/latest/guide/platforms/android/#requirements-and-support > Update cordova-plugin-file to latest version of File API > -------------------------------------------------------- > > Key: CB-13044 > URL: https://issues.apache.org/jira/browse/CB-13044 > Project: Apache Cordova > Issue Type: Task > Components: cordova-plugin-file > Reporter: Filip Maj > Labels: plugins-next > > Part of the roadmap for the core plugins is to update them to make them spec-relevant once more. See CB-12715. > After taking a look at the current version of [W3C File API|https://w3c.github.io/FileAPI/], here is one take on what specific API changes are needed to update the API to the current version: > - *remove* a bunch of APIs, specifically: > -- everything to do with the [old (now discontinued) File System API|https://www.w3.org/TR/file-system-api/]: > --- {{window.requestFileSystem}} method > --- {{LocalFileSystem}} object > --- {{FileSystem}} object > --- {{Flags}} object > --- {{Metadata}} object > --- {{Entry}}, {{DirectoryEntry}} and {{FileEntry}} objects > --- {{DirectoryReader}} object > -- everything to do with the [old, discontinued File Writer API|https://www.w3.org/TR/file-writer-api/]: {{FileWriter}} object > -- {{FileUploadOptions}}, {{FileUploadResult}} objects (wtf are these? I think they are for supporting file transfer? why are they in plugin-file? lol?) > -- the {{FileError}} object, as the [latest spec says to return {{DOMException}}|https://w3c.github.io/FileAPI/#failureReason] > - update a bunch of APIs, specifically: > -- update {{FileReader}} interface's {{readAs*}} methods so that they take a {{Blob}} object instead of a {{File}} object as parameter > -- if the polyfill is still needed, might need to update the {{File}} object and remove a bunch of extra native-y cruft like "type" and stuff that was used when leveraging the bridge > -- update any error handling to return {{DOMException}} instances instead of the now-removed {{FileError}} > - possibly write up a polyfill for {{Blob}} ? Looks like it will be needed in Android 4.4 or lower. > - possibly write up a polyfill for {{FileList}} (as per [spec|https://w3c.github.io/FileAPI/#dfn-filelist]) - might be needed on iOS 9.3 / Android 4.4. Worth noting that the first descriptive text in the spec mentions this interface being "at risk" as it's basically a glorified array. > - review docs: > -- are referencing local file system paths like {{}} still relevant (related to open question #2 below)? > -- review and update https://cordova.apache.org/docs/en/latest/cordova/storage/storage.html#indexeddb - it mentions some things like indexeddb has a 5MB storage, we should probably update it to mention it is supported in ios, and do some quick checking on max storage size. > -- remove https://cordova.apache.org/docs/en/latest/cordova/storage/storage.html#filesystem-api > -- how much of this documentation should reside in the File plugin docs vs. in the general "Storage" cordova docs, or perhaps even the platform docs? over half of the File plugin docs talk about filesystem formats and platform quirks therein. > A few open questions: > 1. One thing worth noting is that platform implementations for a lot of the above may not be needed on iOS 10+ and Android 5.0+. Would need to check windows / edge support. If support is splotchy, we need to keep in mind to write the plugin in such a way that we don't clobber over potentially-pre-existing spec-adhering objects of the File API. > 2. Worth calling out that the [File API defines its own URL scheme to use|https://w3c.github.io/FileAPI/#url]. Does this then supercede the cordova custom ones like cdvfile:// and other protocols? -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org