0

I'm using angularjs and I genereated an image file based64.

given a problem of security policy, I can't save the image data to database,

so I created a code that transform an image based64 to blob file. But I want to move it to a target directory in the project.

  var blob = new Blob([data.img], {type: 'image/png'});
        var file = new File([blob], 'test.png');

so right now, I want to move the image file (file) to a directory image in the project.

I ask if there are any option in angularjs that give me the possibility to move the file to the directory?

Thanks you for helps

Majdi Taleb
  • 731
  • 3
  • 9
  • 26
  • just like [sharing something between the controllers](https://stackoverflow.com/questions/21919962/share-data-between-angularjs-controllers), you can use a service/factory to store your files in (just inject it into your directive and get the image from it) – Aleksey Solovey Apr 04 '18 at 13:45
  • I want to save the file in the directory – Majdi Taleb Apr 04 '18 at 14:38

0 Answers0