(Rails)上传目录 [英] (Rails) Uploading Directories

查看:117
本文介绍了(Rails)上传目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在我的网站上传多个文件。

但是我不需要上传多个文件的表单,我需要上传整个目录。

>

最简单的情况如何?



您的Joern。

解决方案

根据我有限的知识,这是不可能的,只有文件传输是可能的,而不是目录。

一些解决方法,基于关于速度评论的讨论其他讨论


  • 上传a zip,在服务器端解压缩

  • 通过ftp上传目录(网页可以作为前端)

  • 一个



我会去zip或ftp。注意:某人可能已经制作了一个可以上传目录的gem(我对这种事情一无所知,但是如果有的话,我会很乐意的。)


I need to upload multiple files on my website.

But I need not just a form for uploading multiple files, I need to upload whole directories.

How's this possible for the minimalist?

Yours, Joern.

解决方案

According to my somewhat limited knowledge this is not possible, only file transfer is possible, not directories.

Here are some workarounds, based on discussion on Velocity Reviews and another discussion:

  • upload a zip, which you unzip at the server side
  • upload directories over ftp (web page can be a front end to this)
  • upload files one by one

I would go either for zip or ftp. Note: someone might have produced a gem that enables uploading directories (I know nothing of such thing, but I will be happy to find out, if there is).

这篇关于(Rails)上传目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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