You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Raul <ra...@netwie.com> on 2012/11/05 12:49:26 UTC

Resources only for session

I have a question, Is it possible that resources (example
DynamicImageResource) will  not recorded and only available as long as the
session is active.

This is necessary because the user need to show images uploaded by the same
and are not available to other users. Besides the amount of images is very
large adn it's pointless to keep all as resources.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Resources-only-for-session-tp4653617.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Resources only for session

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Can't you just check on your resource something like,

MySession.getSession().getUserId().equals(parameterUserId)

on resource generation? And if so serve a standard image "You don't have
access to this resource".

I do not follow your reasoning about performance. Only images that are
requested by the client side will be "generated". You can always cache
those if you need to do some time consuming processing.


On Mon, Nov 5, 2012 at 1:23 PM, Raul <ra...@netwie.com> wrote:

> Thank Ernesto, I already knew the article. My problem is that I am using a
> ResourceLink as follows.
>
>
> ResourceReference imagesResourceReference = new ImageResourceReference(
>                                 ImageUtil.getNamePhotoForURL(user.getId(),
> album.getId(),
>                                 photo.getId(),
> ImageUtil.SCALE_ORIGINAL),pathOriginalImage);
>
> ResourceLink resourceLink = new
> ResourceLink("linkPhoto",imagesResourceReference);
>
> But this I generated a security problema, because the "href" generated is
> accesible from
> all session, I also believe that a bad performance generates and maintains
> resources that will
> not be used.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Resources-only-for-session-tp4653617p4653620.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Regards - Ernesto Reinaldo Barreiro
Antilia Soft
http://antiliasoft.com/ <http://antiliasoft.com/antilia>

Re: Resources only for session

Posted by Raul <ra...@netwie.com>.
Thank Ernesto, I already knew the article. My problem is that I am using a
ResourceLink as follows.


ResourceReference imagesResourceReference = new ImageResourceReference(
				ImageUtil.getNamePhotoForURL(user.getId(), album.getId(),
				photo.getId(), ImageUtil.SCALE_ORIGINAL),pathOriginalImage);

ResourceLink resourceLink = new
ResourceLink("linkPhoto",imagesResourceReference);
				
But this I generated a security problema, because the "href" generated is
accesible from 
all session, I also believe that a bad performance generates and maintains
resources that will 
not be used.	



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Resources-only-for-session-tp4653617p4653620.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Resources only for session

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
See

http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/




On Mon, Nov 5, 2012 at 12:49 PM, Raul <ra...@netwie.com> wrote:

> I have a question, Is it possible that resources (example
> DynamicImageResource) will  not recorded and only available as long as the
> session is active.
>
> This is necessary because the user need to show images uploaded by the same
> and are not available to other users. Besides the amount of images is very
> large adn it's pointless to keep all as resources.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Resources-only-for-session-tp4653617.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Regards - Ernesto Reinaldo Barreiro
Antilia Soft
http://antiliasoft.com/ <http://antiliasoft.com/antilia>