目的:把本地上传的图片放置到跟目录下的Images/Upload文件夹下。

修改步骤:

1、ueditor.config.js文件中的,

  imagePath: URL + "net/" 

修改为:

  imagePath: "/"  

2、net文件夹下的Config.cs文件中,

  public static string[] ImageSavePath = new string[] { "upload1", "upload2", "upload3" };

修改为: 

  public static string[] ImageSavePath = new string[] { "Images"};

3、net文件夹下的Uploader.cs文件中的upFile方法,

  uploadpath = cxt.Server.MapPath(pathbase);

修改为:

  uploadpath = cxt.Server.MapPath("~/" + pathbase);

4、

  info = up.upFile(context, path + '/', filetype, size);   

修改为:

  info = up.upFile(context, path + '/' + "Upload", filetype, size); 

配置起来有点麻烦,不知道有没有更简单的方法,也不知道对其他东西的上传有没有影响。还请过路的朋友共同分享经验。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-10
  • 2021-04-07
  • 2021-12-28
  • 2022-12-23
  • 2021-06-21
猜你喜欢
  • 2021-09-15
  • 2021-05-05
  • 2021-09-29
  • 2022-12-23
  • 2021-10-31
  • 2021-05-30
  • 2021-11-02
相关资源
相似解决方案