Note that there are some explanatory texts on larger screens.

plurals
  1. POphonegap and playbook - upload file
    primarykey
    data
    text
    <p>I'm using the following code to upload an image. It works fine for android and iphone but not for playbook. I'm using phonegap 1.4.1 - It always calls the fail function below and the alerts show always 'undefined'. config.xml is according to blackberry sample. The application works except the upload function.</p> <p>Thanks in advance.</p> <p>...</p> <pre><code> var options = new FileUploadOptions(); options.fileKey="file"; options.fileName=pictureFlag.substr(pictureFlag.lastIndexOf('/')+1).split('.')[0]; options.mimeType="image/jpeg"; options.chunkedMode = false; var param = new Object(); param.fromEmail = $('#recipeDetailsFromEmailId').val(); param.to = $('#recipeDetailsToEmailId').val(); param.emailType = $('#recipeDetailsSendEmailId').attr('checked'); param.sendMeCopy = $('#recipeSendEmailCopyId').attr('checked'); param.message = $('#recipeDetailsMessageId').val(); param.imageType = imageTypeFlag; param.language = localStorage.language; param.recipeName = nameFlag; param.prepTime = prepTimeFlag; param.serves = servesFlag; param.picture = pictureFlag.split('.')[0] + '.' + pictureFlag.split('.')[1]; param.ingredients = ingredientsFlag; param.preparation = prepDescriptionFlag; param.deviceId = devicePlatform.toLowerCase(); param.category = $("#selectCategoryId option[value='" + categoryFlag + "']").text(); options.params = param; var ft = new FileTransfer(); ft.upload(pictureFlag, url, win, fail, options); </code></pre> <p>...</p> <p>function fail(message) {</p> <pre><code>//alert(message) //alert("evt.target.error.code: " + message.target.error.code); alert("An error has occurred: Code = " + message.code); alert("upload error source " + message.source); alert("upload error target " + message.target); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload