0

I'm a beginner in developing mobile apps with Stamplay. I'm designing an e-commerce mobile app. So far, I have been able to implement authentification, "add category" feature in my app. Now I'm creating a form that allows me to upload articles in the database. Below is my code:

<input type="file" ng-model="article.image_url" ngf-max-height="1000" ngf-max-size="1MB">

Here is the error returned by the debug tool:

TypeError: Cannot read property 'image' of undefined ionic.bundle.js:26794

Any suggestions?

  • I'm not sure that this error is reproduced by this single *line* of `code`. – developer033 Aug 14 '16 at 15:44
  • Thanks for your answer. Now, I can see that the object "article" is handled by the controller, but still I have the following error returned: Error: key $ngfBlobUrl must not start with '$'. Here is my controller: `Stamplay.Object("article").save(article) .then(function(res) { $ionicLoading.hide(); //$state.go("home", {}, { reload: true }); //console.log(res); }, function(err) { console.log(err); $ionicLoading.hide(); })` – Morpheus Dev Aug 14 '16 at 16:33
  • As far I know the `ngf-select` is *required*, check the [**Jsfiddle**](http://jsfiddle.net/danialfarid/0mz6ff9o/135/). – developer033 Aug 14 '16 at 16:35
  • You should try converting the images to base64 and then store them in an array, this made it work for me. – Jurjen Folkertsma Aug 14 '16 at 22:02

0 Answers0