(Rails) Uploading Directories

后端 未结 2 1065
终归单人心
终归单人心 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:13

    Adding another option to the list provided by Sorrow:

    • upload via REST/JSON

    OK, this is a partial solution, but it does give you the opportunity to write a script that reads your directory and POSTS to your website.

    0 讨论(0)
  • 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).

    0 讨论(0)
提交回复
热议问题