dongxiangxie8181 2019-06-04 01:19
浏览 2204
已采纳

如何将multipart.File转换为io.Reader

Maybe I'm just not understanding how to use the Read method for the File object, but I see in docs that io.Reader is within the multipart.File interface, but I don't understand how to access it. Any guidance would be greatly appreciated.

  • 写回答

1条回答 默认 最新

  • doujun7161 2019-06-04 03:32
    关注

    That means that the multipart.File interface includes the io.Reader interface, so any object that is a valid multipart.File is also a valid io.Reader. Therefore, you can call the Read method (as defined by io.Reader) on an object of type multipart.File.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?