2023-10-27 12:37:09 +05:45
@skipOnReva
2023-01-02 17:26:54 +05:45
Feature: upload file
As a user
I want the mtime of an uploaded file to be the creation date on upload source not the upload date
So that I can find files by their real creation date
Background:
2024-11-29 09:39:21 +05:45
Given these users have been created with default attributes:
2023-01-02 17:26:54 +05:45
| username |
| Alice |
| Brian |
2025-09-22 10:52:52 +02:00
2023-01-02 17:26:54 +05:45
Scenario Outline: upload file with mtime to a received share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user " Alice " has created folder " /toShare "
2024-05-22 13:01:54 +05:45
And user " Alice " has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user " Brian " has a share " toShare " synced
2023-01-02 17:26:54 +05:45
When user " Brian " uploads file " filesForUpload/textfile.txt " to " /Shares/toShare/file.txt " with mtime " Thu, 08 Aug 2012 04:18:13 GMT " using the TUS protocol on the WebDAV API
2025-02-11 17:01:57 +05:45
Then the HTTP status code should be " 204 "
And as " Alice " the mtime of the file " /toShare/file.txt " should be " Thu, 08 Aug 2012 04:18:13 GMT "
2023-01-02 17:26:54 +05:45
And as " Brian " the mtime of the file " /Shares/toShare/file.txt " should be " Thu, 08 Aug 2012 04:18:13 GMT "
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
2023-01-02 17:26:54 +05:45
2025-09-22 10:52:52 +02:00
2023-01-02 17:26:54 +05:45
Scenario Outline: upload file with mtime to a send share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user " Alice " has created folder " /toShare "
2024-05-22 13:01:54 +05:45
And user " Alice " has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user " Brian " has a share " toShare " synced
2023-01-02 17:26:54 +05:45
When user " Alice " uploads file " filesForUpload/textfile.txt " to " /toShare/file.txt " with mtime " Thu, 08 Aug 2012 04:18:13 GMT " using the TUS protocol on the WebDAV API
2025-02-11 17:01:57 +05:45
Then the HTTP status code should be " 204 "
And as " Alice " the mtime of the file " /toShare/file.txt " should be " Thu, 08 Aug 2012 04:18:13 GMT "
2023-01-02 17:26:54 +05:45
And as " Brian " the mtime of the file " /Shares/toShare/file.txt " should be " Thu, 08 Aug 2012 04:18:13 GMT "
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
2024-11-07 14:12:16 +05:45
| spaces |
2023-01-02 17:26:54 +05:45
2025-09-22 10:52:52 +02:00
2023-01-02 17:26:54 +05:45
Scenario Outline: overwriting a file with mtime in a received share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user " Alice " has created folder " /toShare "
2024-05-22 13:01:54 +05:45
And user " Alice " has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user " Brian " has a share " toShare " synced
2023-01-02 17:26:54 +05:45
And user " Alice " has uploaded file with content " uploaded content " to " /toShare/file.txt "
When user " Brian " uploads file " filesForUpload/textfile.txt " to " /Shares/toShare/file.txt " with mtime " Thu, 08 Aug 2012 04:18:13 GMT " using the TUS protocol on the WebDAV API
2025-02-11 17:01:57 +05:45
Then the HTTP status code should be " 204 "
And as " Alice " the mtime of the file " /toShare/file.txt " should be " Thu, 08 Aug 2012 04:18:13 GMT "
2023-01-02 17:26:54 +05:45
And as " Brian " the mtime of the file " /Shares/toShare/file.txt " should be " Thu, 08 Aug 2012 04:18:13 GMT "
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
2023-01-02 17:26:54 +05:45
2025-09-22 10:52:52 +02:00
2023-01-02 17:26:54 +05:45
Scenario Outline: overwriting a file with mtime in a send share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user " Alice " has created folder " /toShare "
2024-05-22 13:01:54 +05:45
And user " Alice " has sent the following resource share invitation:
| resource | toShare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user " Brian " has a share " toShare " synced
2023-01-02 17:26:54 +05:45
And user " Brian " has uploaded file with content " uploaded content " to " /Shares/toShare/file.txt "
When user " Alice " uploads file " filesForUpload/textfile.txt " to " /toShare/file.txt " with mtime " Thu, 08 Aug 2012 04:18:13 GMT " using the TUS protocol on the WebDAV API
2025-02-11 17:01:57 +05:45
Then the HTTP status code should be " 204 "
And as " Alice " the mtime of the file " /toShare/file.txt " should be " Thu, 08 Aug 2012 04:18:13 GMT "
2023-01-02 17:26:54 +05:45
And as " Brian " the mtime of the file " /Shares/toShare/file.txt " should be " Thu, 08 Aug 2012 04:18:13 GMT "
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
2024-11-07 14:12:16 +05:45
| spaces |