0

I have a ruby application that currently uses formstone (https://formstone.it/components/upload/) for file uploads and paperclip to save the attachment. I have to include another file type. The filename ends with .mrxs. For these files, a directory exists in the same location as the file, with the same name as the file. Is it possible to upload the directory along with the file when the file is selected?

db20
  • 1
  • Yes and its all under front-end javascript responsibility – 7urkm3n Nov 25 '19 at 22:46
  • I don't think so, for security reasons I guess you don't have access to the files/folders the user did not select. Just imagine if someone could simply upload any sibling file/folder (and it's children) of a file that you selected... – arieljuod Nov 26 '19 at 02:35
  • I don't believe the browser API supports folders, but for sure it will not allow you to pick another file than the user selected. This would be insane in terms of security, since that gives the app permission to rummage through the users drives and pick files willy nilly. – ekampp Nov 26 '19 at 06:41

0 Answers0