apeisa Posted September 5, 2012 Share Posted September 5, 2012 Currently fieldtype creates a new file with suffix like filename_1, filename_2 when files with same filename is uploaded. Most of the time this is good, but sometime it would be good to allow overriding the file. Would it be difficult to check if similar file exists and offer a js confirm wheter to override or create a new file? This is of course for multifile fields, since single file fields override always (not sure if that is every time preferred without confirmation?). I will take a look at this myself at some point, but interested to hear what others think about this? Which would be best UI here? 2 Link to comment Share on other sites More sharing options...
Soma Posted September 5, 2012 Share Posted September 5, 2012 +1 This has already come up at least 2 times in the forum. I think it could be nice in places. Link to comment Share on other sites More sharing options...
ryan Posted September 5, 2012 Share Posted September 5, 2012 This sounds good to me. I'm guessing we could do the JS confirm pretty easily from the ajax upload, though probably not from the oldschool one. So might be good to have a setting that goes with the file field as to whether the default behavior is to overwrite or rename. It'll also require some changes in the WireUpload class, but I don't think anything too major. 1 Link to comment Share on other sites More sharing options...
Adam Kiss Posted September 13, 2012 Share Posted September 13, 2012 Also: if you have one file field, and upload new version of that file (= same filename), while setting the previous file for deletion, overwrite with no confirm is in place, I think. Link to comment Share on other sites More sharing options...
Martijn Geerts Posted September 13, 2012 Share Posted September 13, 2012 Of topic. About files, is there any good solution found to the max amount of files that can be stored in a folder ? For example if you have a site with user generated content, page folders can quickly out grow the maximum amount of stored files in a folder. Link to comment Share on other sites More sharing options...
ryan Posted September 14, 2012 Share Posted September 14, 2012 About files, is there any good solution found to the max amount of files that can be stored in a folder ? For example if you have a site with user generated content, page folders can quickly out grow the maximum amount of stored files in a folder. It depends on the file system. In a common ext3 with dir_index file system there is apparently a limit of 32k subdirectories per directory, and no practical limit on quantity of files in a directory. In a common ext4 file system there apparently is no limit on subdirectories or files, but a maximum individual file size of 16 TB, so be careful. Link to comment Share on other sites More sharing options...
Martijn Geerts Posted September 27, 2012 Share Posted September 27, 2012 Sorry ryan, saw this message today... So you say when hosting a site on server with ext4 file system, there's no real file issue for PW. tnx Link to comment Share on other sites More sharing options...
ryan Posted September 28, 2012 Share Posted September 28, 2012 Sorry ryan, saw this message today... So you say when hosting a site on server with ext4 file system, there's no real file issue for PW. That's my understanding after doing some research online. Though I've not ever pushed those upper limits so just repeating what I've read rather than speaking from personal experience. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now