| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Network.Google.Drive.Upload
Description
Resumable uploads
https://developers.google.com/drive/web/manage-uploads#resumable
Note: actual resuming of uploads on errors is currently untested.
- type UploadSource = Int -> Source (ResourceT IO) ByteString
 - uploadSourceFile :: FilePath -> UploadSource
 - createFileWithContent :: FileData -> Int -> UploadSource -> Api File
 - updateFileWithContent :: FileId -> FileData -> Int -> UploadSource -> Api File
 
Documentation
type UploadSource = Int -> Source (ResourceT IO) ByteString Source
Uploads use sources for space efficiency and so that callers can implement
   things like throttling or progress output themselves. Since uploads are
   resumable, each invocation will give your UploadSource the bytes
   completed so far, so you may create an appropriately offset source (i.e.
   into a file).
uploadSourceFile :: FilePath -> UploadSource Source
Simple UploadSource for uploading from a file
createFileWithContent :: FileData -> Int -> UploadSource -> Api File Source
updateFileWithContent :: FileId -> FileData -> Int -> UploadSource -> Api File Source