【问题标题】:VFS2 - FileSystemException: Could not determine the type of fileVFS2 - FileSystemException:无法确定文件的类型
【发布时间】:2016-03-24 08:23:18
【问题描述】:

我正在尝试使用 VFS 连接到 FTP 服务器并上传 txt 文件,同时我收到错误“commons.vfs2.FileSystemException:无法确定文件类型”

【问题讨论】:

    标签: file upload ftp vfs


    【解决方案1】:

    回答很晚。即使异常显示Could not determine the type of file,这也可能是由于连接问题。如果您尝试通过被动模式连接,请确保在防火墙中允许被动端口范围。如果您使用 docker 容器作为 ftp 服务器,请确保为被动连接公开端口范围。 (示例 - https://github.com/stilliard/docker-pure-ftpd#using-different-passive-ports

    如果您不使用被动模式并尝试主动模式,最好使用被动模式,因为在主动模式下,服务器会主动尝试连接到您的应用程序,您可能也必须公开您的 ip/ports。

    【讨论】:

      猜你喜欢
      • 2023-02-14
      • 1970-01-01
      • 2016-05-23
      • 1970-01-01
      • 1970-01-01
      • 2017-05-03
      • 1970-01-01
      • 2023-04-07
      • 2011-11-14
      相关资源
      最近更新 更多