A filename must be less or equal 255 characters, but when adding the
`.part` and `.ocfiletransfer` extensions we might overflow this limit.
So we should also use filename hashes for uploading when the file has a
long filename, similar like when we are uploading to the user storage
directly.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
When User"user0"uploadsfile"data/textfile.txt"to"/testquota/asdf.txt"
Then theHTTPstatuscodeshouldbe"201"
Scenario: Uploading a file with very long filename
Given usingnewdavpath
And Asan"admin"
And user"user0"exists
And user"user0"hasaquotaof"10MB"
And Asan"user0"
When User"user0"uploadsfile"data/textfile.txt"to"/long-filename-with-250-characters-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.txt"
Then theHTTPstatuscodeshouldbe"201"
Scenario: Uploading a file with a too long filename
Given usingnewdavpath
And Asan"admin"
And user"user0"exists
And user"user0"hasaquotaof"10MB"
And Asan"user0"
When User"user0"uploadsfile"data/textfile.txt"to"/long-filename-with-251-characters-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.txt"
Then theHTTPstatuscodeshouldbe"400"
Scenario: Create a search query on image
Given usingnewdavpath
And Asan"admin"
@ -132,3 +150,14 @@ Feature: dav-v2
Then Favoritesearchshouldwork
And thesingleresponseshouldcontainaproperty"{http://owncloud.org/ns}favorite"withvalue"1"
Scenario: Create a search query on favorite
Given usingnewdavpath
And Asan"admin"
And user"user0"exists
And Asan"user0"
When User"user0"uploadsfile"data/green-square-256.png"to"/fav_image.png"
Then Favoritesearchshouldwork
And theresponseshouldbeempty
When user"user0"favoriteselement"/fav_image.png"
Then Favoritesearchshouldwork
And thesingleresponseshouldcontainaproperty"{http://owncloud.org/ns}favorite"withvalue"1"