octet-stream

This commit is contained in:
Keagan McClelland
2020-07-27 16:12:55 -06:00
parent 9e8ba3d9e5
commit abdb452a11

View File

@@ -90,7 +90,7 @@ chunkIt :: FilePath -> HandlerFor AgentCtx TypedContent
chunkIt fp = do chunkIt fp = do
sz <- liftIO $ fileSize <$> getFileStatus fp sz <- liftIO $ fileSize <$> getFileStatus fp
addHeader "Content-Length" (show sz) addHeader "Content-Length" (show sz)
respondSource typePlain $ CB.sourceFile fp .| awaitForever sendChunkBS respondSource typeOctet $ CB.sourceFile fp .| awaitForever sendChunkBS
recordMetrics :: String -> FilePath -> AppVersion -> HandlerFor AgentCtx () recordMetrics :: String -> FilePath -> AppVersion -> HandlerFor AgentCtx ()
recordMetrics appId rootDir appVersion = do recordMetrics appId rootDir appVersion = do
@@ -119,4 +119,4 @@ recordMetrics appId rootDir appVersion = do
appVersion' <- runDB $ createAppVersion appKey' versionInfo >>= errOnNothing status500 "duplicate app version created" appVersion' <- runDB $ createAppVersion appKey' versionInfo >>= errOnNothing status500 "duplicate app version created"
pure (appKey', appVersion') pure (appKey', appVersion')
Just v -> pure (appKey', entityKey v) Just v -> pure (appKey', entityKey v)
runDB $ createMetric appKey versionKey runDB $ createMetric appKey versionKey