有没有可能使用Flex上传完整的目录结构? [英] Is it possible to upload a complete directory structure with Flex?

查看:174
本文介绍了有没有可能使用Flex上传完整的目录结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我可以使用Flex / BlazeDS / Spring应用程序来上传一个包含子目录和文件(在子目录中)的完整文件夹。问题不在于如何将数据传输到服务器。 问题是:如果可以使用Flex访问文件和子文件夹(递归)?

解决方案

如果你使用AIR,那么是的。查看文件类。它是对文件或目录的引用。您可以使用isDirectory属性来判断它是否是一个目录。您可以使用 getDirectoryListing 获取目录中所有文件和子目录的列表。



据我所知,你必须把东西一个接一个地上传到服务器。



如果您在基于Web的应用程序中使用Flex,我不相信您想要完成什么。


Is it possible to upload a complete folder with subdirectories and files (in the subdirectories) in Flex?

I am using a Flex / BlazeDS / Spring application. The question is not how to transfer the data to the server. The question is: if it is possible to get access to the files and subfolders (recursive) with Flex?

解决方案

If you're working with AIR, then yes. Look a the File class. It is a reference to either a file or directory. You can tell if it is a directory using the isDirectory attribute. You can use getDirectoryListing to get a list of all files and subdirectories in a directory.

As far as I know, you'll then have to upload things one by one to the server, though.

If you are using Flex in a web based app, I do not believe what you're trying to accomplish is possible.

这篇关于有没有可能使用Flex上传完整的目录结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆