Jump to content

PetroP

Level 1
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About PetroP

  1. Evernote app (E Notes) for TouchPad is available now in App Catalog. YouTube video at: We can download it from here: https://developer.palm.com/appredirect/?packageid=com.petzapps.enotesenyo External Link: http://forums.webosnation.com/hp-touchpad-apps/310156-evernote-touchpad-its-way.html -Petro
  2. I am trying to write image resource into local system in javascript code using Node.js, the image file is getting saved successfully, but looks like it is corrupted, not able to open it. Client.js: var onSuccess = function(resource, transport) { self.showResourceData(resource); //console.log("Got Resource: "+resource); }; enyo.application.NoteStore.getResourceData(onSuccess,this.showAlertMessage.bind(this, "Failed to get Resource"), inSender.getValue()); showResourceData: function(resource) { //Calls WriteFileAssistant service this.$.writeFile.call({ path: "/media/internal/downloads/logo1.png", content: resource }); } WriteFileAssistant.js: WriteFileAssistant.prototype.run = function(future) { var filePath = this.controller.args.path; var content = this.controller.args.content; var downloadfile = fs.createWriteStream(filePath, {'flags': 'w',encoding: 'binary'}); downloadfile.write(content, encoding='binary', function(err) { future.result = { path: filePath, bytes: content.length, error: err }; }); } Please find attached the HEX images of original and downloaded files. Any help will be greatly appreciated. -Petro
×
×
  • Create New...