stable
Clone or download
Otherwise this means that a user can try to upload a same file in different contexts (e.g. two browsers, different browser tabs...) and weird errors can happen. The conflict management is already partially handled by the fact that a client has to provide an upload offset equal to the current offset of the resource. The tus protocol does not have explicitly something to deal with the lock of a resource, however official implementations handles it with a HTTP 423 code [0][1], therefore the same solution has been chosen. This is part of story #10721: upload documents with drag'n drop [0] https://github.com/tus/tusd/blob/0.11.0/unrouted_handler.go#L59 [1] https://github.com/tus/tus-js-client/blob/v1.5.2/lib/upload.js#L350 Change-Id: I3767f1902fac3c2cd0d18759068abe4aea2a635b
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/docman/include/Tus/TusDataStore.php | +1 | −0 | Go to diff View file |
A | plugins/docman/include/Tus/TusLocker.php | +29 | −0 | Go to diff View file |
M | plugins/docman/include/Tus/TusServer.php | +20 | −8 | Go to diff View file |
A | plugins/docman/include/Upload/DocumentBeingUploadedLockVerificationException.php | +31 | −0 | Go to diff View file |
A | plugins/docman/include/Upload/DocumentBeingUploadedLocker.php | +103 | −0 | Go to diff View file |
M | plugins/docman/include/Upload/DocumentDataStore.php | +12 | −0 | Go to diff View file |
M | plugins/docman/include/docmanPlugin.class.php | +3 | −0 | Go to diff View file |
M | plugins/docman/phpunit/Tus/TusServerTest.php | +35 | −0 | Go to diff View file |
A | plugins/docman/phpunit/Upload/DocumentBeingUploadedLockerTest.php | +104 | −0 | Go to diff View file |