Silverstripe Version: 3.1
I’m using an UploadField on a page that allows multiple file uploads.
I would like the files uploaded by this field to maintain their directory structure within the upload directory, for example, if the file being uploaded is /DirectoryA/DirectoryB/File.pdf, I would like it to be stored on the server as /Uploads/DirectoryA/DirectoryB/File.pdf rather than /Uploads/File.pdf.
When the files are selected in the UploadField, these directory structures are listed prior to the submission of the form, so I know that the information is being obtained by the UploadField, but I’m not sure how to modify the upload in such a way that these directory structures are maintained.
Although I’m using an older version of SilverStripe, I am willing to upgrade if a solution exists in a newer version that isn’t possible using the current version; as such, please feel free to give responses that are dependent on SilverStripe 4.0+.
Best regards and thanks in advance.