项目作者: marjandn

项目描述 :
download a file and show progress of that
高级语言: Java
项目地址: git://github.com/marjandn/Download-File.git
创建时间: 2018-02-24T12:37:58Z
项目社区:https://github.com/marjandn/Download-File

开源协议:

下载


Download-File

download a file and show progress of that

download a file that can be zip, png , jpg ,… with your custom name or dynamic name that can be decalre in server side.

in this project i use asp.net MVC for server side with this method

  1. public ActionResult DownloadImage()
  2. {
  3. var dir = Server.MapPath("~/Images/Pictures/");
  4. var path = Path.Combine(dir, "imageName" + ".jpg"); //validate the path for security or use other means to generate the path.
  5. return base.File(path, "image/jpeg","imageName");
  6. }

and get it in app with Retrofit