changed upload directory
This commit is contained in:
parent
6934ae5f88
commit
87611667a7
3 changed files with 3 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -12,3 +12,4 @@ yesod-devel/
|
|||
cabal.sandbox.config
|
||||
.DS_Store
|
||||
*.swp
|
||||
data*
|
||||
|
|
|
@ -14,6 +14,6 @@ getActivateR token = do
|
|||
redirect $ HomeR
|
||||
Just x -> do
|
||||
userId <- runDB $ insert $ tokenUser (entityVal x)
|
||||
liftIO $ createDirectory $ "static" </> (unpack $ extractKey userId)
|
||||
liftIO $ createDirectory $ "data" </> (unpack $ extractKey userId)
|
||||
setMessage $ [shamlet|<pre>User activated|]
|
||||
redirect $ HomeR
|
||||
|
|
|
@ -28,7 +28,7 @@ postNewAlbumR = do
|
|||
case result of
|
||||
FormSuccess album -> do
|
||||
albumId <- runDB $ insert album
|
||||
liftIO $ createDirectory $ "static" </> (unpack $ extractKey $ Key userId) </> (unpack $ extractKey albumId)
|
||||
liftIO $ createDirectory $ "data" </> (unpack $ extractKey $ Key userId) </> (unpack $ extractKey albumId)
|
||||
setMessage $ [shamlet|<pre>Album successfully created|]
|
||||
redirect $ ProfileR $ Key userId
|
||||
|
||||
|
|
Loading…
Reference in a new issue