1

I am using ng-flow in my application and it works pretty well. Currently, the destination directory for the files being uploaded is set in my web.config and used within my webapi controller method.

What I want to do is allow the user to specify the destination, rather than it come from config. However, looking at the docs, I don't see an option that I can add to the below appconfig for this:

function appConfig(flowFactoryProvider) {
flowFactoryProvider.defaults = {
    target: 'api/upload',
    permanentErrors: [404, 500, 501],
    maxChunkRetries: 1,
    chunkRetryInterval: 5000,
    simultaneousUploads: 4
};
flowFactoryProvider.on('catchAll', function (event) {
    console.log('catchAll', arguments);
});

}

Am i missing something or do I need to handle this myself?

Declan McNulty
  • 3,194
  • 6
  • 35
  • 54
  • I was under the impression (i could be wrong) that the `target` field is the url that handles the uploaded data? – Sisir Nov 13 '14 at 12:03

1 Answers1

0

You should see a clear separation between your front end and you back end. That is why you are not able to set in flow-js or any other framework.

What you can do, is let the user specify it in a form field and leave the handling to the server side. This way it is also possible to filter on allowed locations. You don't want your client to add files to your system directories.

user969039
  • 511
  • 2
  • 7
  • 18