0

I am looking for a way to upload whole folder using activestorage using its direct_upload feature but I am not able to retrieve file's relative path(webkitRelativePath) on rails end so that I can create exact same structure on S3 or on local disk.

Here the code I am using

 <%= form_tag('/action', method: "post", id:"myForm") do %>
  <%= file_field_tag(:file, webkitdirectory: '', directory: '', multiple: true, direct_upload: true) %>
  <%= submit_tag("Submit", id:"submit_btn") %>
<% end %>

Any help/suggestion greatly appreciated.

Sandeep Garg
  • 1,292
  • 1
  • 13
  • 31

0 Answers0