packages feed

hS3 0.5 → 0.5.1

raw patch · 5 files changed

+5/−37 lines, 5 filesdep ~base

Dependency ranges changed: base

Files

− CONTRIBUTORS
@@ -1,2 +0,0 @@-- <harmen@millionmonkeys.nl>-- Marc Weber <marco-oweber@gmx.de>
Network/AWS/Authentication.hs view
@@ -22,7 +22,7 @@ import Network.AWS.AWSResult import Network.AWS.AWSConnection import Network.AWS.ArrowUtils-import Network.HTTP as HTTP+import Network.HTTP as HTTP hiding (simpleHTTP_) import Network.HTTP.HandleStream (simpleHTTP_) import Network.Stream (Result) import Network.URI as URI@@ -91,6 +91,7 @@                   -> [Header] headersFromAction = map (\(k,v) -> case k of                                     "Content-Type" -> Header HdrContentType v+                                    "Content-Length" -> Header HdrContentLength v                                     otherwise -> Header (HdrCustom k) (mimeEncodeQP v))                     . s3metadata 
− examples/preSignedRequest.hs
@@ -1,31 +0,0 @@-#!/usr/local/bin/runhaskell---------------------------------------------------------------------------------- |--- Program     :  PreSigned Request--- Copyright   :  (c) Greg Heartsfield 2007--- License     :  BSD3------ Generate a pre-signed object request, suitable for sending to a 3rd party.--- Usage:---    preSignedRequest.hs bucket-name object-name seconds-request-valid------ This requires the following environment variables to be set with--- your Amazon keys:---   AWS_ACCESS_KEY_ID---   AWS_ACCESS_KEY_SECRET--------------------------------------------------------------------------------import Network.AWS.S3Object-import Network.AWS.AWSConnection-import System.Environment-import Data.Maybe-import qualified Data.ByteString.Lazy.Char8 as L--main = do argv <- getArgs-          let bucket : key : seconds : xs = argv-          mConn <- amazonS3ConnectionFromEnv-          let conn = fromJust mConn-          let obj = S3Object bucket key "" [] L.empty-          uri <- (publicUriForSeconds conn obj (read seconds))-          print uri
hS3.cabal view
@@ -1,5 +1,5 @@ Name:           hS3-Version:        0.5+Version:        0.5.1 License:        BSD3 License-file:   LICENSE Cabal-Version: >= 1.6@@ -32,7 +32,7 @@  Library -  Build-depends:  base, HTTP >= 4000.0.0, Crypto >= 4.1.0, hxt, network,+  Build-depends:  base >= 3 && < 4, HTTP >= 4000.0.0, Crypto >= 4.1.0, hxt, network,                 regex-compat, old-time, random, old-locale, dataenc, utf8-string, bytestring    Exposed-modules:
hS3.hs view
@@ -37,7 +37,7 @@         do c <- withConn $ \g -> getObject g $ S3Object bucket gkey "" [] L.empty            L.putStr $ obj_data c     ["do", bucket, key] ->-        do withConn $ \g -> deleteObject g $ S3Object bucket key "" [] L.empty+        withConn $ \g -> deleteObject g $ S3Object bucket key "" [] L.empty     ["so", bucket, skey ] ->         (\c ->  withConn $ \g -> sendObject g $ S3Object bucket skey "" [] c)             =<< L.getContents