change post-upload redirect
Now redirecting users to the album they uploaded to.
This commit is contained in:
parent
c4185a65e7
commit
ae2759fde3
2 changed files with 5 additions and 5 deletions
|
@ -106,7 +106,7 @@ postDirectUploadR albumId = do
|
||||||
L.null onlyErrNames
|
L.null onlyErrNames
|
||||||
then do
|
then do
|
||||||
setMessage "All images succesfully uploaded"
|
setMessage "All images succesfully uploaded"
|
||||||
redirect HomeR
|
redirect $ AlbumR albumId
|
||||||
else do
|
else do
|
||||||
let justErrNames = map fromJust onlyErrNames
|
let justErrNames = map fromJust onlyErrNames
|
||||||
let msg = Content $ Text.Blaze.Internal.Text $ "File type not supported of: " `T.append` T.intercalate ", " justErrNames
|
let msg = Content $ Text.Blaze.Internal.Text $ "File type not supported of: " `T.append` T.intercalate ", " justErrNames
|
||||||
|
@ -322,14 +322,14 @@ postUploadR = do
|
||||||
L.null onlyErrNames
|
L.null onlyErrNames
|
||||||
then do
|
then do
|
||||||
setMessage "All images succesfully uploaded"
|
setMessage "All images succesfully uploaded"
|
||||||
redirect HomeR
|
redirect $ AlbumR $ fileBulkAlbum temp
|
||||||
else do
|
else do
|
||||||
let justErrNames = map fromJust onlyErrNames
|
let justErrNames = map fromJust onlyErrNames
|
||||||
let msg = Content $ Text.Blaze.Internal.Text $ "File type not supported of: " `T.append` T.intercalate ", " justErrNames
|
let msg = Content $ Text.Blaze.Internal.Text $ "File type not supported of: " `T.append` T.intercalate ", " justErrNames
|
||||||
setMessage msg
|
setMessage msg
|
||||||
redirect HomeR
|
redirect $ AlbumR $ fileBulkAlbum temp
|
||||||
_ -> do
|
_ -> do
|
||||||
setMessage "There was an error uploading the file"
|
setMessage "There was an error uploading the file(s)"
|
||||||
redirect UploadR
|
redirect UploadR
|
||||||
Nothing -> do
|
Nothing -> do
|
||||||
setMessage "You need to be logged in"
|
setMessage "You need to be logged in"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: eidolon
|
name: eidolon
|
||||||
version: 0.1.5.4
|
version: 0.1.5.5
|
||||||
synopsis: Image gallery in Yesod
|
synopsis: Image gallery in Yesod
|
||||||
homepage: https://eidolon.nek0.eu
|
homepage: https://eidolon.nek0.eu
|
||||||
license: AGPL-3
|
license: AGPL-3
|
||||||
|
|
Loading…
Reference in a new issue