{"action":"created","issue":{"url":"https://api.github.com/repos/bchavez/RethinkDb.Driver/issues/28","repository_url":"https://api.github.com/repos/bchavez/RethinkDb.Driver","labels_url":"https://api.github.com/repos/bchavez/RethinkDb.Driver/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/bchavez/RethinkDb.Driver/issues/28/comments","events_url":"https://api.github.com/repos/bchavez/RethinkDb.Driver/issues/28/events","html_url":"https://github.com/bchavez/RethinkDb.Driver/issues/28","id":133363296,"number":28,"title":"Issue download ReGrid file after upload","user":{"login":"superlogical","id":287641,"avatar_url":"https://avatars.githubusercontent.com/u/287641?v=3","gravatar_id":"","url":"https://api.github.com/users/superlogical","html_url":"https://github.com/superlogical","followers_url":"https://api.github.com/users/superlogical/followers","following_url":"https://api.github.com/users/superlogical/following{/other_user}","gists_url":"https://api.github.com/users/superlogical/gists{/gist_id}","starred_url":"https://api.github.com/users/superlogical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superlogical/subscriptions","organizations_url":"https://api.github.com/users/superlogical/orgs","repos_url":"https://api.github.com/users/superlogical/repos","events_url":"https://api.github.com/users/superlogical/events{/privacy}","received_events_url":"https://api.github.com/users/superlogical/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-02-12T22:54:03Z","updated_at":"2016-02-13T08:28:18Z","closed_at":null,"body":"I'm on Windows 7 using VS2013 with `2.2.5-beta-2 RethinkDb.Driver.ReGrid` nuget package. I'm also using the Windows version of the server `RethinkDB 2.2.4-windows-alpha-4`\r\n\r\n\r\nI can upload the file ok using this code\r\n\r\n````csharp\r\nBucket bucket = new Bucket(connection, dbname, \"file\");\r\nbucket.Purge();\r\nbucket.Mount();\r\n\r\nvar uploadId = bucket.Upload(\"MyNameIsBob.jpg\", File.ReadAllBytes(\"1.jpg\"));\r\nlog.Information(\"UploadId {uploadId}\", uploadId);\r\n````\r\n\r\nWhich logs out the file Id\r\n````\r\n2016-02-13 11:44:53 [Information] UploadId d9620ba1-fe64-45bb-8cba-d2faa9d77f12\r\n````\r\n\r\nBut when I try and download I get this error: \r\n````csharp\r\nbyte[] bytes = bucket.DownloadBytes(uploadId, new DownloadOptions());\r\nlog.Information(\"MyNameIsBob length {length}\", bytes.Length);\r\n````\r\n\r\nThis is the exception stack trace:\r\n\r\n````\r\nSystem.AggregateException: One or more errors occurred. ---> RethinkDb.Driver.ReGrid.ChunkException: ReGrid chunk 2 of file id d9620ba1-fe64-45bb-8cba-d2faa9d77f12 is missing.\r\n   at RethinkDb.Driver.ReGrid.DownloadStreamForwardOnly.GetNextBatchFromCursor(Boolean hasMore)\r\n   at RethinkDb.Driver.ReGrid.DownloadStreamForwardOnly.<GetNextBatchAsync>d__19.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()\r\n   at RethinkDb.Driver.ReGrid.DownloadStreamForwardOnly.<GetSegmentAsync>d__17.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n   at RethinkDb.Driver.ReGrid.DownloadStreamForwardOnly.<ReadAsync>d__16.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n   at RethinkDb.Driver.ReGrid.Bucket.<DownloadToStreamHelperAsync>d__36.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()\r\n   at RethinkDb.Driver.ReGrid.Bucket.<DownloadBytesHelperAsync>d__34.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n   at RethinkDb.Driver.ReGrid.Bucket.<DownloadBytesHelperAsync>d__33.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n   at RethinkDb.Driver.ReGrid.Bucket.<DownloadAsBytesAsync>d__26.MoveNext()\r\n   --- End of inner exception stack trace ---\r\n   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\r\n   at System.Threading.Tasks.Task.Wait()\r\n   at RethinkDb.Driver.Utils.TaskHelper.WaitSync[T](Task`1 task)\r\n   at RethinkDb.Driver.ReGrid.Bucket.DownloadBytes(Guid fileId, DownloadOptions options)\r\n   at Sprightly.ConsoleSpike.Program.<>c__DisplayClass5.<<Main>b__4>d__7.MoveNext() in c:\\Dev\\Sprightly\\src\\Sprightly.ConsoleSpike\\Program.cs:line 71\r\n---> (Inner Exception #0) RethinkDb.Driver.ReGrid.ChunkException: ReGrid chunk 2 of file id d9620ba1-fe64-45bb-8cba-d2faa9d77f12 is missing.\r\n   at RethinkDb.Driver.ReGrid.DownloadStreamForwardOnly.GetNextBatchFromCursor(Boolean hasMore)\r\n   at RethinkDb.Driver.ReGrid.DownloadStreamForwardOnly.<GetNextBatchAsync>d__19.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()\r\n   at RethinkDb.Driver.ReGrid.DownloadStreamForwardOnly.<GetSegmentAsync>d__17.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n   at RethinkDb.Driver.ReGrid.DownloadStreamForwardOnly.<ReadAsync>d__16.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n   at RethinkDb.Driver.ReGrid.Bucket.<DownloadToStreamHelperAsync>d__36.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()\r\n   at RethinkDb.Driver.ReGrid.Bucket.<DownloadBytesHelperAsync>d__34.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n   at RethinkDb.Driver.ReGrid.Bucket.<DownloadBytesHelperAsync>d__33.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()\r\n   at RethinkDb.Driver.ReGrid.Bucket.<DownloadAsBytesAsync>d__26.MoveNext()<---\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bchavez/RethinkDb.Driver/issues/comments/183624897","html_url":"https://github.com/bchavez/RethinkDb.Driver/issues/28#issuecomment-183624897","issue_url":"https://api.github.com/repos/bchavez/RethinkDb.Driver/issues/28","id":183624897,"user":{"login":"superlogical","id":287641,"avatar_url":"https://avatars.githubusercontent.com/u/287641?v=3","gravatar_id":"","url":"https://api.github.com/users/superlogical","html_url":"https://github.com/superlogical","followers_url":"https://api.github.com/users/superlogical/followers","following_url":"https://api.github.com/users/superlogical/following{/other_user}","gists_url":"https://api.github.com/users/superlogical/gists{/gist_id}","starred_url":"https://api.github.com/users/superlogical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superlogical/subscriptions","organizations_url":"https://api.github.com/users/superlogical/orgs","repos_url":"https://api.github.com/users/superlogical/repos","events_url":"https://api.github.com/users/superlogical/events{/privacy}","received_events_url":"https://api.github.com/users/superlogical/received_events","type":"User","site_admin":false},"created_at":"2016-02-13T08:28:18Z","updated_at":"2016-02-13T08:28:18Z","body":"Cool man thanks heaps. I'm keen to use Rethink on an ecommerce site I'm building. The File upload stuff is nice to have but could just use S3 or an image upload service. Will let you know if I find any problems. Appreciate your work!"}}