Commit Graph

63 Commits

Author SHA1 Message Date
Marius 6de723ec8b core: Do not emit post-receive hook when the offset didn't change 2019-05-15 23:57:32 +02:00
Kirill Shvakov 495068b5a4 core: Remove unnecessary goroutines (#253)
* deleted unnecessary goroutines

* remove unnecessary goroutines

* restore NotifyTerminatedUploads

* fix merge

* restore NotifyTerminatedUploads

fix merge

revert upload progress event
2019-03-21 20:04:01 +01:00
oliverpool 0baa9eaf48 Forward status code and body from pre-create HTTP hook (#236)
* Forward status code from Pre-create http hook

Fix #170

* Allow the returned body to difer from the logged error

* Update HTTP Hooks documentation
2019-02-12 22:45:08 +01:00
Tom Hofman 3549a75e8c Added Upload-Concat to Access-Control-Allow-Headers (#215)
* Added Upload-Concat to Access-Control-Allow-Headers for enabling browsers to make use of the concatenation extension

* Unit test update
2018-11-10 20:10:38 +00:00
egalpin c42ba74f10 Updates uploadLength logic in PatchFile 2018-06-22 11:35:57 -04:00
Adam Jensen 7f11b92fab Refactor Upload-Length handling to use early returns 2018-06-13 20:21:49 -04:00
Adam Jensen 7fd0139355 Add Upload-Defer-Length to access-control-{allow,expose}-headers 2018-06-11 17:58:08 -04:00
Adam Jensen c605926ff8 If a partial upload has a deferred size, then it's not finished 2018-06-03 16:03:28 -04:00
Adam Jensen 8c3ceebcfc If size is deferred, then constrain how much of the request body to read 2018-06-03 16:03:27 -04:00
Adam Jensen a366b00e3e Return appropriate errors if upload-length is misused in PATCH requests 2018-06-03 12:57:40 -04:00
Adam Jensen 22fdd3935b Return upload length error if it's too small or too large 2018-06-03 12:57:40 -04:00
Adam Jensen d545b6518b Conditionally include creation-defer-length if the composer supports it 2018-06-03 12:57:40 -04:00
Adam Jensen 7bd1cd6f9d Integrate DeclareLength into handler's PatchFile 2018-06-03 12:57:40 -04:00
Adam Jensen c6d5ad08c0 When it's requested, verify length deferrer support in the datastore 2018-06-03 12:57:40 -04:00
Adam Jensen 5252c98cd7 Avoid incorrectly returning errors when upload length is deferred 2018-06-03 12:57:39 -04:00
Adam Jensen 64c02a9de1 Update the upload length in FileInfo when it's sent 2018-06-03 12:57:39 -04:00
Adam Jensen c94e0cd0b6 Add creation-defer-length to supported extensions 2018-06-03 12:57:39 -04:00
Adam Jensen 1ab5231643 Add basic Upload-Defer-Length header handling 2018-06-03 12:57:39 -04:00
Adam Jensen 1affbbdbe4 Add error constants for deferred upload length 2018-06-03 12:56:02 -04:00
Jason Papakostas 8acbc4cfdb Expose ParseMetadataHeader and SerializeMetadataHeader functions
closes #186
2018-05-22 11:52:22 -05:00
Marius c470fe3a9d Emit post-finish event for empty uploads
See https://github.com/tus/tus-js-client/issues/106
2018-03-29 14:40:43 +02:00
Marius dbd0a957b5 Allow plus sign in MIME types
For example, image/svg+xml
2018-03-03 21:56:46 +01:00
Marius 5e22d82ca5 Allow certain file types to be shown inline in browsers 2018-02-28 22:55:14 +01:00
Marius 6230c23566 Force browser to download content
For example, prevent HTML from being rendered
2018-02-19 18:28:42 +01:00
Marius a51f5994bb Squashed commit of the following:
commit d6ba86b7c300122af52e5be71b5fade4bb88d77c
Author: Marius <maerious@gmail.com>
Date:   Wed Jul 19 17:44:56 2017 +0200

    Add documentation for post-create

commit 1d1605f98036e6cfd7e2695cf2e4f8510a220326
Author: Marius <maerious@gmail.com>
Date:   Wed Jul 19 13:21:01 2017 +0200

    Remove duplicated log for created uploads

commit 1f5c6d22bb62e1251297db9b10f78f6db363759d
Author: Marius <maerious@gmail.com>
Date:   Wed Jul 19 13:08:11 2017 +0200

    Rename UploadsCreated to CreatedUploads to match other names

commit 5c67ea7548548986c4bce79b7eea311a02a4c541
Author: Marius <maerious@gmail.com>
Date:   Wed Jul 19 13:07:14 2017 +0200

    Remove unused variable from hook script

commit e21d7f5824ce533d80d74e75835ddc33de2184fb
Merge: 028ba57 447aa9c
Author: Marius <maerious@gmail.com>
Date:   Wed Jul 19 12:47:52 2017 +0200

    Merge branch 'f-post-create-hook' of https://github.com/flaneurtv/tusd into flaneurtv-f-post-create-hook

commit 447aa9c485
Author: Markus Kienast <mark@rickkiste.at>
Date:   Thu Jul 13 15:57:07 2017 +0200

    added post-create hook

    added test for handler.UploadCreated

    go fmt .
2017-07-19 17:45:16 +02:00
Matthew Wratt 5600cf2d6e Allow override of default options response 2017-04-12 11:53:15 +02:00
Marius c8b8703bb1 Move network timeout handling back in UnroutedHandler 2017-03-01 19:43:37 +01:00
oliverpool 74fca8c6c3 Squashed commit of the following:
commit d214ad5c92073cb754c70ab73e6cf229cba01c72
Author: Marius <maerious@gmail.com>
Date:   Tue Feb 28 20:38:47 2017 +0100

    Minor code and comment cleanups

commit 2826227404296d98a2d83519efaa754cc07a47b1
Merge: db47c89 1a58d6e
Author: Marius <maerious@gmail.com>
Date:   Tue Feb 28 20:13:15 2017 +0100

    Merge branch 'metrics_race_condition' of https://github.com/oliverpool/tusd into oliverpool-metrics_race_condition

commit 1a58d6e084
Author: oliverpool <oliverpool@hotmail.fr>
Date:   Tue Feb 28 19:14:21 2017 +0100

    prometheus metrics typo

commit db47c8976489917a8afc53878335ab66d73fe60d
Merge: 168942b 12054be
Author: Marius <maerious@gmail.com>
Date:   Tue Feb 28 17:36:47 2017 +0100

    Merge branch 'metrics_race_condition' of https://github.com/oliverpool/tusd into oliverpool-metrics_race_condition

commit 12054be4e7
Author: oliverpool <oliverpool@hotmail.fr>
Date:   Tue Feb 28 12:07:43 2017 +0100

    add go vet on travis

commit 16e95d2d91
Author: oliverpool <oliverpool@hotmail.fr>
Date:   Tue Feb 28 11:58:58 2017 +0100

    add one go vet on appveyor

commit 13bc64517b
Author: oliverpool <oliverpool@hotmail.fr>
Date:   Tue Feb 28 11:57:56 2017 +0100

    use even less pointers

commit db7130f18a
Author: oliverpool <oliverpool@hotmail.fr>
Date:   Mon Feb 27 22:12:45 2017 +0100

    use pointer only when needed

commit 647f7390c6
Author: oliverpool <oliverpool@hotmail.fr>
Date:   Thu Feb 23 16:29:01 2017 +0100

    Prevent lock malfunction

    literal copies lock value from metrics

commit 1ce196ed35
Author: oliverpool <oliverpool@hotmail.fr>
Date:   Wed Feb 22 12:22:19 2017 +0100

    handle read timeout simplification in metrics

commit 338017c9f4
Merge: c378bc9 45a9278
Author: oliverpool <oliverpool@hotmail.fr>
Date:   Wed Feb 22 12:21:42 2017 +0100

    Merge branch 'master' into metrics_race_condition

commit c378bc9798
Author: oliverpool <oliverpool@hotmail.fr>
Date:   Wed Feb 22 11:51:56 2017 +0100

    consistent naming

commit e2b0050b8d
Author: oliverpool <oliverpool@hotmail.fr>
Date:   Wed Feb 22 11:44:05 2017 +0100

    Use a simplfied error structure for error counting

commit 3da4095c08
Author: oliverpool <oliverpool@hotmail.fr>
Date:   Mon Feb 20 16:38:27 2017 +0100

    split ptr retrieval and incrementation

commit ebd6873cbb
Author: oliverpool <oliverpool@hotmail.fr>
Date:   Sun Feb 5 22:01:34 2017 +0100

    Useless initialization

commit 691224cdbf
Author: oliverpool <oliverpool@hotmail.fr>
Date:   Thu Feb 2 08:25:55 2017 +0100

    increment the pointer

commit 3d9395e1df
Author: oliverpool <oliverpool@hotmail.fr>
Date:   Thu Feb 2 08:25:42 2017 +0100

    Simplify lock logic

commit d7a4619080
Author: oliverpool <oliverpool@hotmail.fr>
Date:   Wed Feb 1 08:37:46 2017 +0100

    Prevent race condition on errorstotal increment

    The HTTPError interface is used to have detailed metrics (by code as
    well)
2017-02-28 20:40:44 +01:00
Marius 73b273d4bd Add documentation for NotifyUploadProgress 2017-02-21 23:17:07 +01:00
Marius ca95bf275a Exclude too detailed information from timeout error 2017-02-20 17:14:58 +01:00
Marius 7710fd79fb Correct parsing Upload-Concat for final uplaods
Addresses https://github.com/tus/tus-resumable-upload-protocol/issues/123
2017-01-31 16:58:31 +01:00
Marius f50f03fe6f Allow data store to set the status code for errors
Closes https://github.com/tus/tusd/issues/77
2017-01-26 23:15:05 +01:00
Marius 97bd6db73f Add NotifyUploadProgress configuration option 2017-01-19 21:02:58 +01:00
Marius 888049ce50 Add test for attempting empty download 2016-10-13 18:38:43 +02:00
Marius 182a96e3e8 Do not reject unexpected content types during upload creation
See tus/tus-java-client#10
2016-09-29 21:20:56 +02:00
Marius 9a5646ad6c Add proper, formatted logging 2016-09-23 21:21:38 +02:00
Marius dc673402d2 Add support for Creation With Upload extension
See tus/tus-resumable-upload-protocol#88 for the current proposal
2016-08-28 22:06:37 +02:00
Marius 6b1e8a8bda Respond with the correct 200 OK code for HEAD requests
Fixes #48
2016-08-28 15:26:12 +02:00
Marius c80c8b1962 Allow exposing metrics for Prometheus and Co. 2016-05-24 17:04:28 +02:00
Marius d6bc50ff12 Use 200 OK in responses for preflight requests
Some browsers only accept 200 OK and not 204 No Content as respones codes
for preflight requests.

See tus/tus-js-client#34
2016-05-10 11:58:43 +02:00
Marius 3e6ea68d07 Suggest original filename when downloading 2016-04-19 11:22:32 +02:00
Marius 4e8842d91c Do not pass chunk for uploaded uploads to data store 2016-04-09 22:09:22 +02:00
Marius bcea96b88e Add test for complete upload notifications using Concatenaiton 2016-03-12 22:52:31 +01:00
Marius acf2e8daee Improve documentation for complete uploads notifications 2016-03-12 22:28:24 +01:00
Marius 3ee1c61d80 Add post-terminate hook 2016-03-12 22:24:57 +01:00
Marius 03ab994a4e Merge branch 'master' into composer 2016-02-22 14:12:24 +01:00
Marius a949cb6b81 Set proper offset for complete notifications 2016-02-22 13:58:05 +01:00
Marius 21ae1c45a7 Add initial draft of StoreComposr 2016-02-21 23:25:35 +01:00
Marius 13c27e1c19 Send Upload Complete Notification for concatenations 2016-02-21 18:38:43 +01:00
Marius db9204927d Merge branch 'forwarded-host' 2016-01-23 14:11:47 +01:00