title: Upload large video file chunks use retrofit2 (Android)
body: <p>Sorry for my english. I need upload large files to server. I use retrofit2 for this. Now i upload files without chunks, i send single file. Like this:</p>
  
  <p>interface</p>
  
  <pre><code>@Multipart
  @POST("/api/upload")
  Observable&lt;UploadVideoResponse&gt; uploadVideo(@Header("Authorization") String userToken,
                                              @Part MultipartBody.Part video);
  </code></pre>
  
  <p>like this i create <code>MultipartBody.Part video</code></p>
  
  <pre><code> public static MultipartBody.Part getMultipartVideoBody(String pathVideo) {
          try {
              File videoFile = getFile(pathVideo);
              RequestBody videoBody = RequestBody.create(MediaType.parse("video/*"), videoFile);
              String fileName = videoFile.getName();
              return MultipartBody.Part.createFormData("video", fileName, videoBody);
          }catch (Exception e){
              Log.e("File ", e.getMessage());
              return null;
          }
      }
  </code></pre>
  
  <p>In the server use <a href="https://github.com/pionl/laravel-chunk-upload" rel="nofollow noreferrer">laravel-chunk-upload</a> and for chunks upload in front-end use like this:</p>
  
  <pre><code>dropzoneOptions: {
                     url: '/uploadtest',
                     dictDefaultMessage: 'Click here',
                     chunksUploaded: function (file, done) {
                         done()
                     },
                     thumbnailWidth: 150,
                     maxFilesize: 250,
                     chunking: false,
                     chunkSize: 1000000, // Bytes
                     required: true,
                     maxFiles: 1,
                     acceptedFiles: 'video/*',
                     headers: {
                         'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                     }
                 },
  </code></pre>
  
  <p>Now i cant understend how i can upload large video file from chunks. Please give me some advice</p>