upload fixes

This commit is contained in:
nek0 2015-01-16 22:41:44 +01:00
parent 1147617739
commit 737fc7ad0e
2 changed files with 3 additions and 10 deletions

View file

@ -60,11 +60,11 @@ postDirectUploadR albumId = do
mime <- return $ fileContentType file mime <- return $ fileContentType file
case mime `elem` acceptedTypes of case mime `elem` acceptedTypes of
True -> do True -> do
albRef <- runDB $ getJust albumId
ownerId <- return $ albumOwner albRef
path <- writeOnDrive file ownerId albumId path <- writeOnDrive file ownerId albumId
(thumbPath, iWidth, tWidth) <- generateThumb path ownerId albumId (thumbPath, iWidth, tWidth) <- generateThumb path ownerId albumId
tempName <- return $ ((fileBulkPrefix temp) `T.append` " " `T.append` (T.pack (show index)) `T.append` " of " `T.append` (T.pack (show (length indFils)))) tempName <- case length indFils == 1 of
False -> return $ ((fileBulkPrefix temp) `T.append` " " `T.append` (T.pack (show index)) `T.append` " of " `T.append` (T.pack (show (length indFils))))
True -> return $ fileBulkPrefix temp
medium <- return $ Medium medium <- return $ Medium
tempName tempName
('/' : path) ('/' : path)

View file

@ -1,7 +0,0 @@
<div id="header" class="item" data-width="400">
<form class="inner" method=post enctype=#{enctype}>
<h3>Image upload
<p>Here you can upload your image.
^{uploadWidget}
<div>
<input type=submit value="Upload">