teiraa18 teiraa18 - 4 years ago 201
AngularJS Question

How do I store images with Backand and Ionic?

How exactly do I go about storing profile images for in the Users object?

Answer Source

In Backand server side add the "Backand Storage" action, with this code:

function backandCallback(userInput, dbRow, parameters, userProfile) {
  // upload file
  if (request.method == "POST"){
    var url = files.upload(parameters.filename, parameters.filedata);
    return {"url": url};
  // delete file
  else if (request.method == "DELETE"){
    return {};    

And on the client side you can use this code in Ionic, it is based to copy the code from here: backand docs

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download