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 EFA4C200B23 for ; Sun, 5 Jun 2016 07:51:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EE2C8160A4E; Sun, 5 Jun 2016 05:51:01 +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 42E04160A26 for ; Sun, 5 Jun 2016 07:51:01 +0200 (CEST) Received: (qmail 25701 invoked by uid 500); 5 Jun 2016 05:50:59 -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 25078 invoked by uid 99); 5 Jun 2016 05:50:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Jun 2016 05:50:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 89F772C1F79 for ; Sun, 5 Jun 2016 05:50:59 +0000 (UTC) Date: Sun, 5 Jun 2016 05:50:59 +0000 (UTC) From: =?utf-8?Q?L=C3=A1szl=C3=B3_Radics_=28JIRA=29?= To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-10858) Cant access javascript native File function MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 05 Jun 2016 05:51:02 -0000 [ https://issues.apache.org/jira/browse/CB-10858?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D153157= 51#comment-15315751 ]=20 L=C3=A1szl=C3=B3 Radics commented on CB-10858: ------------------------------------ here is a workaround //workaround: https://issues.apache.org/jira/browse/CB-10858 //native API: File([blob], name, properties) //cordova API: File(name, localURL, type, lastModifiedDate, size) function fixFile() { document.addEventListener("deviceready", function () { var cordovaFile =3D window.File; delete window.File; var nativeFile =3D window.File; window.File =3D function () { var arg =3D []; // unshift for (var i =3D arguments.length; i > 0; i--) arg[i] =3D arguments[i - 1]; if (Array.isArray(arguments[0])) { return new (Function.prototype.bind.apply(nativeFile, arg))= ; } else { return new (Function.prototype.bind.apply(cordovaFile, arg)= ); } }; }); } > Cant access javascript native File function > ------------------------------------------- > > Key: CB-10858 > URL: https://issues.apache.org/jira/browse/CB-10858 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File > Reporter: jose nuno neto > Labels: triaged > > I am using the cordova-plugin-file and need to create a File object with = javascript native function > https://developer.mozilla.org/en/docs/Web/API/File > But this plugin overrides that defenition. > How can I use the plugin and still have acess to the native File function= ? -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org