rename?

3 messages Options
Embed this post
Permalink
Dave-33

rename?

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Can someone help me with just a quick re-naming of a file?
 
I edit an image but it always returns the same image before it was edited I guess because its caching the image. I have tried everything with cache and give up.
 
So after editing the image i want to assign it a new name and return that to the view.
 
So it will always be a new file name after each edit.
 
592254896.jpg to rand() + the original extension.
 
Thanks,
 
Dave

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

majna

Re: rename?

Reply Threaded More More options
Print post
Permalink

http://book.cakephp.org/view/431/disableCache


or display image as $html->image('dog.gif?nocache='.time());

On Nov 4, 12:08 am, "Dave" <[hidden email]> wrote:

> Can someone help me with just a quick re-naming of a file?
>
> I edit an image but it always returns the same image before it was edited I
> guess because its caching the image. I have tried everything with cache and
> give up.
>
> So after editing the image i want to assign it a new name and return that to
> the view.
>
> So it will always be a new file name after each edit.
>
> 592254896.jpg to rand() + the original extension.
>
> Thanks,
>
> Dave
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Robert P-2

Re: rename?

Reply Threaded More More options
Print post
Permalink
In reply to this post by Dave-33

To my knowledge Cake doesn't cache assets (with the exception of
compressed CSS) but instead tell the browser to cache them.

Have you tried the old Ctrl+F5 force refresh?

On Nov 4, 7:08 am, "Dave" <[hidden email]> wrote:

> Can someone help me with just a quick re-naming of a file?
>
> I edit an image but it always returns the same image before it was edited I
> guess because its caching the image. I have tried everything with cache and
> give up.
>
> So after editing the image i want to assign it a new name and return that to
> the view.
>
> So it will always be a new file name after each edit.
>
> 592254896.jpg to rand() + the original extension.
>
> Thanks,
>
> Dave
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---