Iâve looked at other topics but couldnât find an answer to this. Is there a way to have the files sorted alphabetically, once theyâre uploaded? Theyâre actually shown alphabetically in the upload progress view.
Use case: my client has event pictures that she preselects by changing the file name. She then uploads and would like to keep the order, however be able to change the order once uploaded.
Well, a files field is a select field and the data is stored in the order in which they are selected, not in alphabetical order. You could sort them alphabetically on save, but then youâd lose the option to sort them manually.
When I drag and drop or upload them, they appear randomly, which is kind of bizarre. Iâve tried selecting them in order before dragging them, but that doesnât help. I can, certainly, upload them one by one but thatâs cumbersome with 30+ pics.
We can read that âNote that the default sorting order of files is according to their order in the file system.â here, but the order in the files field is random when we using it for upload new images:
In a files field, the images are sorted in the order they are stored in the content file, so this is also true if you render them in the frontend, unless you sort them.