You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Simon MacDonald (Created) (JIRA)" <ji...@apache.org> on 2012/04/02 18:31:26 UTC

[jira] [Created] (CB-422) Quality parameter does not affect pictures chosen from the gallery.

Quality parameter does not affect pictures chosen from the gallery.
-------------------------------------------------------------------

                 Key: CB-422
                 URL: https://issues.apache.org/jira/browse/CB-422
             Project: Apache Callback
          Issue Type: Bug
          Components: Android
    Affects Versions: 1.5.0
         Environment: Aram picchipalarm@googlemail.com via googlegroups.com 

HI,
Im using phonegap online build for my html5 app
currently testing on android 2.3.4

the problem is when uploading a picture from camera capture the quality option works but when selecting from gallery it uploads full image size

here are some code, for when button pressed.

if (options[0]["selector"] == 1)
{ 
	var myobj ={
		quality: 2, 
		destinationType: navigator.camera.DestinationType.DATA_URL ,
		sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY 
	}
			
}
else if (options[0]["selector"] == 2)
{
	var myobj ={
		quality: 2, 
		destinationType: navigator.camera.DestinationType.FILE_URI,
		sourceType: navigator.camera.PictureSourceType.CAMERA
	}
}
			
navigator.camera.getPicture(function (fileURI) {
	var win = function(r) {
	 	alert("win");
	}
					
	var fail = function(error) {
					
		alert("An error has occurred: Code = " + error.code);
	}
	
	var options = new FileUploadOptions();
	options.fileKey="file";
	options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
	options.mimeType="text/plain";

	var params = new Object();
	params.xx= "xx";
				
	options.params = params;
			
	var ft = new FileTransfer();
	ft.upload(fileURI, "http://xx.xx.com/service/", win, fail, options);

			
	},
	function(message) {
		alert('get picture failed'); 
					
	}, myobj);

	

just to confirm button press correctly selects gallery or camera and both upload fine to my server, problem in quality of gallery item cant be changed?

            Reporter: Simon MacDonald
            Assignee: Joe Bowser


Just wondering if we should fix this or update the docs to make it clear how quality works when selecting from the photo library. I will check with Becky to see how iOS handles as BB ignores quality.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-422) Quality parameter does not affect pictures chosen from the gallery.

Posted by "Joe Bowser (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser updated CB-422:
--------------------------

    Component/s:     (was: Android)
                 Docs

This should be documented, but it's no longer an Android-Specific issue.  But where?
                
> Quality parameter does not affect pictures chosen from the gallery.
> -------------------------------------------------------------------
>
>                 Key: CB-422
>                 URL: https://issues.apache.org/jira/browse/CB-422
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Docs
>    Affects Versions: 1.5.0
>            Reporter: Simon MacDonald
>            Assignee: Joe Bowser
>             Fix For: 1.7.0
>
>
> Aram picchipalarm@googlemail.com via googlegroups.com 
> HI,
> Im using phonegap online build for my html5 app
> currently testing on android 2.3.4
> the problem is when uploading a picture from camera capture the quality option works but when selecting from gallery it uploads full image size
> here are some code, for when button pressed.
> {code:title=Example.js|borderStyle=solid}
> if (options[0]["selector"] == 1)
> { 
> 	var myobj ={
> 		quality: 2, 
> 		destinationType: navigator.camera.DestinationType.DATA_URL ,
> 		sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY 
> 	}
> 			
> }
> else if (options[0]["selector"] == 2)
> {
> 	var myobj ={
> 		quality: 2, 
> 		destinationType: navigator.camera.DestinationType.FILE_URI,
> 		sourceType: navigator.camera.PictureSourceType.CAMERA
> 	}
> }
> 			
> navigator.camera.getPicture(function (fileURI) {
> 	var win = function(r) {
> 	 	alert("win");
> 	}
> 					
> 	var fail = function(error) {
> 					
> 		alert("An error has occurred: Code = " + error.code);
> 	}
> 	
> 	var options = new FileUploadOptions();
> 	options.fileKey="file";
> 	options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
> 	options.mimeType="text/plain";
> 	var params = new Object();
> 	params.xx= "xx";
> 				
> 	options.params = params;
> 			
> 	var ft = new FileTransfer();
> 	ft.upload(fileURI, "http://xx.xx.com/service/", win, fail, options);
> 			
> 	},
> 	function(message) {
> 		alert('get picture failed'); 
> 					
> 	}, myobj);
> {code}
> 	just to confirm button press correctly selects gallery or camera and both upload fine to my server, problem in quality of gallery item cant be changed?
> Simon said: 
> Just wondering if we should fix this or update the docs to make it clear how quality works when selecting from the photo library. I will check with Becky to see how iOS handles as BB ignores quality.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CB-422) Quality parameter does not affect pictures chosen from the gallery.

Posted by "Joe Bowser (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser resolved CB-422.
---------------------------

    Resolution: Fixed

Updated the docs to specify correct behaviour.
                
> Quality parameter does not affect pictures chosen from the gallery.
> -------------------------------------------------------------------
>
>                 Key: CB-422
>                 URL: https://issues.apache.org/jira/browse/CB-422
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Docs
>    Affects Versions: 1.5.0
>            Reporter: Simon MacDonald
>            Assignee: Joe Bowser
>             Fix For: 1.7.0
>
>
> Aram picchipalarm@googlemail.com via googlegroups.com 
> HI,
> Im using phonegap online build for my html5 app
> currently testing on android 2.3.4
> the problem is when uploading a picture from camera capture the quality option works but when selecting from gallery it uploads full image size
> here are some code, for when button pressed.
> {code:title=Example.js|borderStyle=solid}
> if (options[0]["selector"] == 1)
> { 
> 	var myobj ={
> 		quality: 2, 
> 		destinationType: navigator.camera.DestinationType.DATA_URL ,
> 		sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY 
> 	}
> 			
> }
> else if (options[0]["selector"] == 2)
> {
> 	var myobj ={
> 		quality: 2, 
> 		destinationType: navigator.camera.DestinationType.FILE_URI,
> 		sourceType: navigator.camera.PictureSourceType.CAMERA
> 	}
> }
> 			
> navigator.camera.getPicture(function (fileURI) {
> 	var win = function(r) {
> 	 	alert("win");
> 	}
> 					
> 	var fail = function(error) {
> 					
> 		alert("An error has occurred: Code = " + error.code);
> 	}
> 	
> 	var options = new FileUploadOptions();
> 	options.fileKey="file";
> 	options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
> 	options.mimeType="text/plain";
> 	var params = new Object();
> 	params.xx= "xx";
> 				
> 	options.params = params;
> 			
> 	var ft = new FileTransfer();
> 	ft.upload(fileURI, "http://xx.xx.com/service/", win, fail, options);
> 			
> 	},
> 	function(message) {
> 		alert('get picture failed'); 
> 					
> 	}, myobj);
> {code}
> 	just to confirm button press correctly selects gallery or camera and both upload fine to my server, problem in quality of gallery item cant be changed?
> Simon said: 
> Just wondering if we should fix this or update the docs to make it clear how quality works when selecting from the photo library. I will check with Becky to see how iOS handles as BB ignores quality.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-422) Quality parameter does not affect pictures chosen from the gallery.

Posted by "Joe Bowser (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser updated CB-422:
--------------------------

    Description: 
Aram picchipalarm@googlemail.com via googlegroups.com 

HI,
Im using phonegap online build for my html5 app
currently testing on android 2.3.4

the problem is when uploading a picture from camera capture the quality option works but when selecting from gallery it uploads full image size

here are some code, for when button pressed.

if (options[0]["selector"] == 1)
{ 
	var myobj ={
		quality: 2, 
		destinationType: navigator.camera.DestinationType.DATA_URL ,
		sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY 
	}
			
}
else if (options[0]["selector"] == 2)
{
	var myobj ={
		quality: 2, 
		destinationType: navigator.camera.DestinationType.FILE_URI,
		sourceType: navigator.camera.PictureSourceType.CAMERA
	}
}
			
navigator.camera.getPicture(function (fileURI) {
	var win = function(r) {
	 	alert("win");
	}
					
	var fail = function(error) {
					
		alert("An error has occurred: Code = " + error.code);
	}
	
	var options = new FileUploadOptions();
	options.fileKey="file";
	options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
	options.mimeType="text/plain";

	var params = new Object();
	params.xx= "xx";
				
	options.params = params;
			
	var ft = new FileTransfer();
	ft.upload(fileURI, "http://xx.xx.com/service/", win, fail, options);

			
	},
	function(message) {
		alert('get picture failed'); 
					
	}, myobj);

	just to confirm button press correctly selects gallery or camera and both upload fine to my server, problem in quality of gallery item cant be changed?


Simon said: 
Just wondering if we should fix this or update the docs to make it clear how quality works when selecting from the photo library. I will check with Becky to see how iOS handles as BB ignores quality.

  was:Just wondering if we should fix this or update the docs to make it clear how quality works when selecting from the photo library. I will check with Becky to see how iOS handles as BB ignores quality.

    Environment:     (was: Aram picchipalarm@googlemail.com via googlegroups.com 

HI,
Im using phonegap online build for my html5 app
currently testing on android 2.3.4

the problem is when uploading a picture from camera capture the quality option works but when selecting from gallery it uploads full image size

here are some code, for when button pressed.

if (options[0]["selector"] == 1)
{ 
	var myobj ={
		quality: 2, 
		destinationType: navigator.camera.DestinationType.DATA_URL ,
		sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY 
	}
			
}
else if (options[0]["selector"] == 2)
{
	var myobj ={
		quality: 2, 
		destinationType: navigator.camera.DestinationType.FILE_URI,
		sourceType: navigator.camera.PictureSourceType.CAMERA
	}
}
			
navigator.camera.getPicture(function (fileURI) {
	var win = function(r) {
	 	alert("win");
	}
					
	var fail = function(error) {
					
		alert("An error has occurred: Code = " + error.code);
	}
	
	var options = new FileUploadOptions();
	options.fileKey="file";
	options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
	options.mimeType="text/plain";

	var params = new Object();
	params.xx= "xx";
				
	options.params = params;
			
	var ft = new FileTransfer();
	ft.upload(fileURI, "http://xx.xx.com/service/", win, fail, options);

			
	},
	function(message) {
		alert('get picture failed'); 
					
	}, myobj);

	

just to confirm button press correctly selects gallery or camera and both upload fine to my server, problem in quality of gallery item cant be changed?
)
    
> Quality parameter does not affect pictures chosen from the gallery.
> -------------------------------------------------------------------
>
>                 Key: CB-422
>                 URL: https://issues.apache.org/jira/browse/CB-422
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.5.0
>            Reporter: Simon MacDonald
>            Assignee: Joe Bowser
>             Fix For: 1.7.0
>
>
> Aram picchipalarm@googlemail.com via googlegroups.com 
> HI,
> Im using phonegap online build for my html5 app
> currently testing on android 2.3.4
> the problem is when uploading a picture from camera capture the quality option works but when selecting from gallery it uploads full image size
> here are some code, for when button pressed.
> if (options[0]["selector"] == 1)
> { 
> 	var myobj ={
> 		quality: 2, 
> 		destinationType: navigator.camera.DestinationType.DATA_URL ,
> 		sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY 
> 	}
> 			
> }
> else if (options[0]["selector"] == 2)
> {
> 	var myobj ={
> 		quality: 2, 
> 		destinationType: navigator.camera.DestinationType.FILE_URI,
> 		sourceType: navigator.camera.PictureSourceType.CAMERA
> 	}
> }
> 			
> navigator.camera.getPicture(function (fileURI) {
> 	var win = function(r) {
> 	 	alert("win");
> 	}
> 					
> 	var fail = function(error) {
> 					
> 		alert("An error has occurred: Code = " + error.code);
> 	}
> 	
> 	var options = new FileUploadOptions();
> 	options.fileKey="file";
> 	options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
> 	options.mimeType="text/plain";
> 	var params = new Object();
> 	params.xx= "xx";
> 				
> 	options.params = params;
> 			
> 	var ft = new FileTransfer();
> 	ft.upload(fileURI, "http://xx.xx.com/service/", win, fail, options);
> 			
> 	},
> 	function(message) {
> 		alert('get picture failed'); 
> 					
> 	}, myobj);
> 	just to confirm button press correctly selects gallery or camera and both upload fine to my server, problem in quality of gallery item cant be changed?
> Simon said: 
> Just wondering if we should fix this or update the docs to make it clear how quality works when selecting from the photo library. I will check with Becky to see how iOS handles as BB ignores quality.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-422) Quality parameter does not affect pictures chosen from the gallery.

Posted by "Joe Bowser (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser updated CB-422:
--------------------------

    Description: 
Aram picchipalarm@googlemail.com via googlegroups.com 

HI,
Im using phonegap online build for my html5 app
currently testing on android 2.3.4

the problem is when uploading a picture from camera capture the quality option works but when selecting from gallery it uploads full image size

here are some code, for when button pressed.

{code:title=Example.js|borderStyle=solid}

if (options[0]["selector"] == 1)
{ 
	var myobj ={
		quality: 2, 
		destinationType: navigator.camera.DestinationType.DATA_URL ,
		sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY 
	}
			
}
else if (options[0]["selector"] == 2)
{
	var myobj ={
		quality: 2, 
		destinationType: navigator.camera.DestinationType.FILE_URI,
		sourceType: navigator.camera.PictureSourceType.CAMERA
	}
}
			
navigator.camera.getPicture(function (fileURI) {
	var win = function(r) {
	 	alert("win");
	}
					
	var fail = function(error) {
					
		alert("An error has occurred: Code = " + error.code);
	}
	
	var options = new FileUploadOptions();
	options.fileKey="file";
	options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
	options.mimeType="text/plain";

	var params = new Object();
	params.xx= "xx";
				
	options.params = params;
			
	var ft = new FileTransfer();
	ft.upload(fileURI, "http://xx.xx.com/service/", win, fail, options);

			
	},
	function(message) {
		alert('get picture failed'); 
					
	}, myobj);

{code}

	just to confirm button press correctly selects gallery or camera and both upload fine to my server, problem in quality of gallery item cant be changed?


Simon said: 
Just wondering if we should fix this or update the docs to make it clear how quality works when selecting from the photo library. I will check with Becky to see how iOS handles as BB ignores quality.

  was:
Aram picchipalarm@googlemail.com via googlegroups.com 

HI,
Im using phonegap online build for my html5 app
currently testing on android 2.3.4

the problem is when uploading a picture from camera capture the quality option works but when selecting from gallery it uploads full image size

here are some code, for when button pressed.

{code:title=Example.java|borderStyle=solid}

if (options[0]["selector"] == 1)
{ 
	var myobj ={
		quality: 2, 
		destinationType: navigator.camera.DestinationType.DATA_URL ,
		sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY 
	}
			
}
else if (options[0]["selector"] == 2)
{
	var myobj ={
		quality: 2, 
		destinationType: navigator.camera.DestinationType.FILE_URI,
		sourceType: navigator.camera.PictureSourceType.CAMERA
	}
}
			
navigator.camera.getPicture(function (fileURI) {
	var win = function(r) {
	 	alert("win");
	}
					
	var fail = function(error) {
					
		alert("An error has occurred: Code = " + error.code);
	}
	
	var options = new FileUploadOptions();
	options.fileKey="file";
	options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
	options.mimeType="text/plain";

	var params = new Object();
	params.xx= "xx";
				
	options.params = params;
			
	var ft = new FileTransfer();
	ft.upload(fileURI, "http://xx.xx.com/service/", win, fail, options);

			
	},
	function(message) {
		alert('get picture failed'); 
					
	}, myobj);

{code}

	just to confirm button press correctly selects gallery or camera and both upload fine to my server, problem in quality of gallery item cant be changed?


Simon said: 
Just wondering if we should fix this or update the docs to make it clear how quality works when selecting from the photo library. I will check with Becky to see how iOS handles as BB ignores quality.

    
> Quality parameter does not affect pictures chosen from the gallery.
> -------------------------------------------------------------------
>
>                 Key: CB-422
>                 URL: https://issues.apache.org/jira/browse/CB-422
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.5.0
>            Reporter: Simon MacDonald
>            Assignee: Joe Bowser
>             Fix For: 1.7.0
>
>
> Aram picchipalarm@googlemail.com via googlegroups.com 
> HI,
> Im using phonegap online build for my html5 app
> currently testing on android 2.3.4
> the problem is when uploading a picture from camera capture the quality option works but when selecting from gallery it uploads full image size
> here are some code, for when button pressed.
> {code:title=Example.js|borderStyle=solid}
> if (options[0]["selector"] == 1)
> { 
> 	var myobj ={
> 		quality: 2, 
> 		destinationType: navigator.camera.DestinationType.DATA_URL ,
> 		sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY 
> 	}
> 			
> }
> else if (options[0]["selector"] == 2)
> {
> 	var myobj ={
> 		quality: 2, 
> 		destinationType: navigator.camera.DestinationType.FILE_URI,
> 		sourceType: navigator.camera.PictureSourceType.CAMERA
> 	}
> }
> 			
> navigator.camera.getPicture(function (fileURI) {
> 	var win = function(r) {
> 	 	alert("win");
> 	}
> 					
> 	var fail = function(error) {
> 					
> 		alert("An error has occurred: Code = " + error.code);
> 	}
> 	
> 	var options = new FileUploadOptions();
> 	options.fileKey="file";
> 	options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
> 	options.mimeType="text/plain";
> 	var params = new Object();
> 	params.xx= "xx";
> 				
> 	options.params = params;
> 			
> 	var ft = new FileTransfer();
> 	ft.upload(fileURI, "http://xx.xx.com/service/", win, fail, options);
> 			
> 	},
> 	function(message) {
> 		alert('get picture failed'); 
> 					
> 	}, myobj);
> {code}
> 	just to confirm button press correctly selects gallery or camera and both upload fine to my server, problem in quality of gallery item cant be changed?
> Simon said: 
> Just wondering if we should fix this or update the docs to make it clear how quality works when selecting from the photo library. I will check with Becky to see how iOS handles as BB ignores quality.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-422) Quality parameter does not affect pictures chosen from the gallery.

Posted by "Joe Bowser (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser updated CB-422:
--------------------------

    Description: 
Aram picchipalarm@googlemail.com via googlegroups.com 

HI,
Im using phonegap online build for my html5 app
currently testing on android 2.3.4

the problem is when uploading a picture from camera capture the quality option works but when selecting from gallery it uploads full image size

here are some code, for when button pressed.

{code:title=Example.java|borderStyle=solid}

if (options[0]["selector"] == 1)
{ 
	var myobj ={
		quality: 2, 
		destinationType: navigator.camera.DestinationType.DATA_URL ,
		sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY 
	}
			
}
else if (options[0]["selector"] == 2)
{
	var myobj ={
		quality: 2, 
		destinationType: navigator.camera.DestinationType.FILE_URI,
		sourceType: navigator.camera.PictureSourceType.CAMERA
	}
}
			
navigator.camera.getPicture(function (fileURI) {
	var win = function(r) {
	 	alert("win");
	}
					
	var fail = function(error) {
					
		alert("An error has occurred: Code = " + error.code);
	}
	
	var options = new FileUploadOptions();
	options.fileKey="file";
	options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
	options.mimeType="text/plain";

	var params = new Object();
	params.xx= "xx";
				
	options.params = params;
			
	var ft = new FileTransfer();
	ft.upload(fileURI, "http://xx.xx.com/service/", win, fail, options);

			
	},
	function(message) {
		alert('get picture failed'); 
					
	}, myobj);

{code}

	just to confirm button press correctly selects gallery or camera and both upload fine to my server, problem in quality of gallery item cant be changed?


Simon said: 
Just wondering if we should fix this or update the docs to make it clear how quality works when selecting from the photo library. I will check with Becky to see how iOS handles as BB ignores quality.

  was:
Aram picchipalarm@googlemail.com via googlegroups.com 

HI,
Im using phonegap online build for my html5 app
currently testing on android 2.3.4

the problem is when uploading a picture from camera capture the quality option works but when selecting from gallery it uploads full image size

here are some code, for when button pressed.

if (options[0]["selector"] == 1)
{ 
	var myobj ={
		quality: 2, 
		destinationType: navigator.camera.DestinationType.DATA_URL ,
		sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY 
	}
			
}
else if (options[0]["selector"] == 2)
{
	var myobj ={
		quality: 2, 
		destinationType: navigator.camera.DestinationType.FILE_URI,
		sourceType: navigator.camera.PictureSourceType.CAMERA
	}
}
			
navigator.camera.getPicture(function (fileURI) {
	var win = function(r) {
	 	alert("win");
	}
					
	var fail = function(error) {
					
		alert("An error has occurred: Code = " + error.code);
	}
	
	var options = new FileUploadOptions();
	options.fileKey="file";
	options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
	options.mimeType="text/plain";

	var params = new Object();
	params.xx= "xx";
				
	options.params = params;
			
	var ft = new FileTransfer();
	ft.upload(fileURI, "http://xx.xx.com/service/", win, fail, options);

			
	},
	function(message) {
		alert('get picture failed'); 
					
	}, myobj);

	just to confirm button press correctly selects gallery or camera and both upload fine to my server, problem in quality of gallery item cant be changed?


Simon said: 
Just wondering if we should fix this or update the docs to make it clear how quality works when selecting from the photo library. I will check with Becky to see how iOS handles as BB ignores quality.

    
> Quality parameter does not affect pictures chosen from the gallery.
> -------------------------------------------------------------------
>
>                 Key: CB-422
>                 URL: https://issues.apache.org/jira/browse/CB-422
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.5.0
>            Reporter: Simon MacDonald
>            Assignee: Joe Bowser
>             Fix For: 1.7.0
>
>
> Aram picchipalarm@googlemail.com via googlegroups.com 
> HI,
> Im using phonegap online build for my html5 app
> currently testing on android 2.3.4
> the problem is when uploading a picture from camera capture the quality option works but when selecting from gallery it uploads full image size
> here are some code, for when button pressed.
> {code:title=Example.java|borderStyle=solid}
> if (options[0]["selector"] == 1)
> { 
> 	var myobj ={
> 		quality: 2, 
> 		destinationType: navigator.camera.DestinationType.DATA_URL ,
> 		sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY 
> 	}
> 			
> }
> else if (options[0]["selector"] == 2)
> {
> 	var myobj ={
> 		quality: 2, 
> 		destinationType: navigator.camera.DestinationType.FILE_URI,
> 		sourceType: navigator.camera.PictureSourceType.CAMERA
> 	}
> }
> 			
> navigator.camera.getPicture(function (fileURI) {
> 	var win = function(r) {
> 	 	alert("win");
> 	}
> 					
> 	var fail = function(error) {
> 					
> 		alert("An error has occurred: Code = " + error.code);
> 	}
> 	
> 	var options = new FileUploadOptions();
> 	options.fileKey="file";
> 	options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
> 	options.mimeType="text/plain";
> 	var params = new Object();
> 	params.xx= "xx";
> 				
> 	options.params = params;
> 			
> 	var ft = new FileTransfer();
> 	ft.upload(fileURI, "http://xx.xx.com/service/", win, fail, options);
> 			
> 	},
> 	function(message) {
> 		alert('get picture failed'); 
> 					
> 	}, myobj);
> {code}
> 	just to confirm button press correctly selects gallery or camera and both upload fine to my server, problem in quality of gallery item cant be changed?
> Simon said: 
> Just wondering if we should fix this or update the docs to make it clear how quality works when selecting from the photo library. I will check with Becky to see how iOS handles as BB ignores quality.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-422) Quality parameter does not affect pictures chosen from the gallery.

Posted by "Joe Bowser (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser updated CB-422:
--------------------------

    Fix Version/s: 1.7.0
    
> Quality parameter does not affect pictures chosen from the gallery.
> -------------------------------------------------------------------
>
>                 Key: CB-422
>                 URL: https://issues.apache.org/jira/browse/CB-422
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.5.0
>         Environment: Aram picchipalarm@googlemail.com via googlegroups.com 
> HI,
> Im using phonegap online build for my html5 app
> currently testing on android 2.3.4
> the problem is when uploading a picture from camera capture the quality option works but when selecting from gallery it uploads full image size
> here are some code, for when button pressed.
> if (options[0]["selector"] == 1)
> { 
> 	var myobj ={
> 		quality: 2, 
> 		destinationType: navigator.camera.DestinationType.DATA_URL ,
> 		sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY 
> 	}
> 			
> }
> else if (options[0]["selector"] == 2)
> {
> 	var myobj ={
> 		quality: 2, 
> 		destinationType: navigator.camera.DestinationType.FILE_URI,
> 		sourceType: navigator.camera.PictureSourceType.CAMERA
> 	}
> }
> 			
> navigator.camera.getPicture(function (fileURI) {
> 	var win = function(r) {
> 	 	alert("win");
> 	}
> 					
> 	var fail = function(error) {
> 					
> 		alert("An error has occurred: Code = " + error.code);
> 	}
> 	
> 	var options = new FileUploadOptions();
> 	options.fileKey="file";
> 	options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
> 	options.mimeType="text/plain";
> 	var params = new Object();
> 	params.xx= "xx";
> 				
> 	options.params = params;
> 			
> 	var ft = new FileTransfer();
> 	ft.upload(fileURI, "http://xx.xx.com/service/", win, fail, options);
> 			
> 	},
> 	function(message) {
> 		alert('get picture failed'); 
> 					
> 	}, myobj);
> 	
> just to confirm button press correctly selects gallery or camera and both upload fine to my server, problem in quality of gallery item cant be changed?
>            Reporter: Simon MacDonald
>            Assignee: Joe Bowser
>             Fix For: 1.7.0
>
>
> Just wondering if we should fix this or update the docs to make it clear how quality works when selecting from the photo library. I will check with Becky to see how iOS handles as BB ignores quality.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira