后端.net abp框架,前端AngularJS如何实现文件上传

问题遇到的现象和发生背景

使用.net 的abp框架,前端用的是angularJs ,为什么执行了这个receiveJson.changePlayText 方法之后就去调用接口了,没有看到调用ajax,如果要做文件上传该怎么做

以下是代码

html:

img


js:

img

后端 c#代码

using Abp.Application.Services;
using Abp.Application.Services.Dto;
using Abp.Authorization;
using Abp.AutoMapper;
using Abp.Configuration;
using Abp.Domain.Repositories;
using Abp.UI;
using AirportBroadcast.ActiveMQ.Dto;
using AirportBroadcast.Baseinfo.dtos;
using AirportBroadcast.Configuration;
using AirportBroadcast.Domain.activeMq;
using AirportBroadcast.Domain.baseinfo;
using AirportBroadcast.Domain.playSets;
using AirportBroadcast.Utility;
using AutoMapper;
using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace AirportBroadcast.ActiveMQ
{
public interface IReceiveJsonAppService : IApplicationService
{

       void ChangePlayText(HandPlayTextDto input);
}
[AbpAuthorize]
public class ReceiveJsonAppService : AbpZeroTemplateAppServiceBase, IReceiveJsonAppService
{
    private readonly IRepositorylong> repository;
    private readonly IRepositorylong> _crepository;
    private readonly IRepositorylong> _rcrepository;
    private readonly IRepository _audioTurnPlateRepository;
    private readonly IRepository _checkinRepository;

    private readonly IRepository _gateRepository;
    private readonly IRepository _reasonRepository;

    private readonly IRepositorylong> _logRepository;

    private readonly ICommAudioTempleAppService _play;
    private readonly ActiveMQListener listener;
    private readonly IAppFolders appFolders;
    private readonly IRepository topPwrRepository;
    private readonly IRepository deviceRepository;

    public ReceiveJsonAppService(IRepositorylong> repository,
         IRepositorylong> _rcrepository,
         IRepositorylong> _crepository,
         IRepository _checkinRepository,
         IRepository _gateRepository,
         IRepository _reasonRepository,
         IRepository topPwrRepository,
         IRepositorylong> _logRepository,
         IRepository deviceRepository,
         ICommAudioTempleAppService _play,
         ActiveMQListener listener,
          IAppFolders appFolders,
         IRepository _audioTurnPlateRepository)
    {
        this.repository = repository;
        this._crepository = _crepository;
        this._rcrepository = _rcrepository;
        this._audioTurnPlateRepository = _audioTurnPlateRepository;
        this._checkinRepository = _checkinRepository;
        this._gateRepository = _gateRepository;
        this._reasonRepository = _reasonRepository;
        this._logRepository = _logRepository;
        this._play = _play;
        this.listener = listener;
        this.appFolders = appFolders;
        this.topPwrRepository = topPwrRepository;
        this.deviceRepository = deviceRepository;
    }





  

    public async void ChangePlayText(HandPlayTextDto input)
    {
        //bool flag = true;
        //int count = 0;
        for (int i = 0; i < input.PlayTimes ; i++) {
            PlayChangeVedio(input);
           // PlayChangeStreamVedio(input);
        }
        //while (flag) {
        //    try
        //    {
        //        if (input.PlayTimes >= count)
        //        {
        //            flag = true;
        //        }
                
        //        count++;
        //    }
        //    catch (Exception e)
        //    {
        //        throw e;
        //        Thread.Sleep(1000);
        //        Console.WriteLine("异常等待被播放");

        //    }
        //}
    }

     private bool PlayChangeVedio(HandPlayTextDto input) {
        if (string.IsNullOrEmpty(input.FileUrl))
        {
            return false;
        }
        #region 组装需打开的电源控制器的端口
        var entitys = topPwrRepository.GetAll().Where(x => input.TopPortIds.Contains(x.Id)).ToList();

        string port = "00000000";
        entitys.ForEach(x =>
        {
            var index = int.Parse(x.Code);
            port = port.Substring(0, index - 1) + "1" + port.Substring(index);
        });
        #endregion

        #region 查询所有声卡 ,暂未用到
        var des = deviceRepository.GetAllList().Select(x => x.Name).ToList();
        #endregion
        
        _play.PlayVedio(input.FileUrl, port, des);


        return true;
            
    }

  
}

}

1. 现在想实现一个文件上传的功能,但是文件流不知道该怎么传输到后端
2. 还有一个问题为什么没有看到ajax就请求了接口,很费解!
求大lao指教!