Commit Graph

56 Commits

Author SHA1 Message Date
Derrick Hammer 27cbe2d886
fix: wrong hash encoding 2024-01-24 02:00:53 -05:00
Derrick Hammer 5d715fcac4
fix: wrong endpoint 2024-01-24 01:59:09 -05:00
Derrick Hammer efcd5b0b8a
fix: set bucket to protocol name 2024-01-24 01:57:09 -05:00
Derrick Hammer 12093637ed
feat: add initial version of GetFile 2024-01-24 01:26:40 -05:00
Derrick Hammer fb1112f3a2
fix: we need to pin the file after creating the upload 2024-01-22 19:08:56 -05:00
Derrick Hammer 8df2ee9ee8
fix: we need to manually delete both the uploaded buffer file and the metafile 2024-01-22 19:06:28 -05:00
Derrick Hammer 7b96682ce0
feat: compute metadata file id and delete it 2024-01-22 18:54:19 -05:00
Derrick Hammer 1643dacdd4
refactor: store s3 client 2024-01-22 18:53:31 -05:00
Derrick Hammer 11e533577b
refactor: return bytes count from hashing to use for upload record 2024-01-22 18:52:37 -05:00
Derrick Hammer da298cc56f
refactor: return s3 client instance with BuildUploadBufferTus 2024-01-22 18:51:09 -05:00
Derrick Hammer bf36562fca
feat: create upload record after sending to renterd 2024-01-22 18:25:11 -05:00
Derrick Hammer 3fcb897e7a
fix: need to borrow the check from finishUploadIfComplete and invert it 2024-01-22 18:02:15 -05:00
Derrick Hammer 941ce27293
fix: only process completed upload if its final 2024-01-22 17:49:42 -05:00
Derrick Hammer e0c6c88e75
feat: add TusUploadCompleted method 2024-01-22 17:49:03 -05:00
Derrick Hammer d86e0e0105
fix: need to use where 2024-01-21 01:06:14 -05:00
Derrick Hammer e0de290cff
fix: pass model protocol property 2024-01-21 00:48:50 -05:00
Derrick Hammer 3e0246df28
fix: set client timeout to a high number for now 2024-01-21 00:19:04 -05:00
Derrick Hammer ae4901757b
fix: log PutFile error 2024-01-21 00:08:49 -05:00
Derrick Hammer e73fa0a103
refactor: switch to github.com/imroc/req as go-resty can't handle streaming uploads 2024-01-20 23:36:55 -05:00
Derrick Hammer c2cccc4b84
fix: pass bucket as query arg, not as form data 2024-01-20 22:51:00 -05:00
Derrick Hammer 6bee380e75
fix: retain only the 1st 32 bytes 2024-01-20 12:30:18 -05:00
Derrick Hammer bcf2998faa
fix: need to get a new reader to stream the file 2024-01-20 12:26:31 -05:00
Derrick Hammer 43c4590439
refactor: use time.Ticker 2024-01-20 11:16:54 -05:00
Derrick Hammer ea4a22c52d
fix: remove duplicate chan close 2024-01-20 11:07:06 -05:00
Derrick Hammer 6bbfac661a
fix: call released on ctx done 2024-01-20 11:06:50 -05:00
Derrick Hammer 112fbb4c51
refactor: moved anon func to private released method 2024-01-20 11:04:43 -05:00
Derrick Hammer 5465cf7a63
fix: RequestRelease needs to be inside for, but after we check for a non-busy error 2024-01-20 10:48:42 -05:00
Derrick Hammer 8c86ecc5b7
fix: TusUploadExists needs to operate on TusUpload not Upload 2024-01-20 07:05:27 -05:00
Derrick Hammer e8fbe46dfc
fix: uploaderID is uint64 2024-01-20 06:57:57 -05:00
Derrick Hammer 0ab70dcaa5
fix: if we have errors at the CreatedUploads hook, cancel the upload 2024-01-20 06:41:51 -05:00
Derrick Hammer af5b6241bf
fix: NotifyCreatedUploads needs to be enabled 2024-01-20 06:27:11 -05:00
Derrick Hammer 48e3c690ce
feat: register storage service with cron 2024-01-19 17:47:14 -05:00
Derrick Hammer 4c92750dd0
feat: add tus getter 2024-01-19 16:51:41 -05:00
Derrick Hammer 6acf8a606a
feat: initial tus protocol and processing support 2024-01-19 15:51:31 -05:00
Derrick Hammer b50c16ff2a
feat: implement a tus locker based on mysql 2024-01-19 15:50:09 -05:00
Derrick Hammer 8c4687fd67
feat: add storage CreateUpload 2024-01-17 14:46:22 -05:00
Derrick Hammer cc5fadeef3
fix: remove debug line 2024-01-16 01:54:46 -05:00
Derrick Hammer aa2ee9eee2
fix: handle both when IsError is true and when we have an error object 2024-01-16 01:36:19 -05:00
Derrick Hammer af4a2eed4a
fix: use Database not Db 2024-01-16 01:29:29 -05:00
Derrick Hammer 0c5827ce0b
Revert "fix: try to deref?"
This reverts commit a19af267cf.
2024-01-16 01:17:46 -05:00
Derrick Hammer a19af267cf
fix: try to deref? 2024-01-16 01:14:42 -05:00
Derrick Hammer 58f734d3b3
fix: use a 32 byte hash, not 64 2024-01-16 01:08:39 -05:00
Derrick Hammer a4e0e1fa58
refactor: have FileExists return the upload model if it exists 2024-01-16 01:01:57 -05:00
Derrick Hammer 866d105028
refactor: rename CIDExists to FileExists and have it work on hashes and check in hex format 2024-01-16 00:58:51 -05:00
Derrick Hammer 61696f42b8
feat: add GetHash 2024-01-16 00:48:06 -05:00
Derrick Hammer 62e22d0d39
feat: add CIDExists 2024-01-16 00:40:50 -05:00
Derrick Hammer 387ec56bec
fix: disable resty warnings 2024-01-15 14:45:35 -05:00
Derrick Hammer 699869ca3e
fix: wrong payload to bucket create 2024-01-15 14:36:06 -05:00
Derrick Hammer 138b7a8e8c
fix: wrong bucket create endpoint 2024-01-15 14:33:51 -05:00
Derrick Hammer d4ed4eb9a2
fic: add createBucketIfNotExists helper 2024-01-15 14:25:12 -05:00