(Rails) Uploading Directories

后端 未结 2 1079
终归单人心
终归单人心 2020-12-18 10:34

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 possi

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-18 11:20

    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).

提交回复
热议问题