Re: Image overwrite

2020-02-17 Thread Soumen Khatua
okay,thank you

On Mon, Feb 17, 2020 at 5:46 PM onlinejudge95 
wrote:

> On Sun, Feb 16, 2020 at 11:09 AM Soumen Khatua 
> wrote:
>
>> Hi Folks,
>>
>> I have a model where user can upload their image.
>>
>
> I am assuming you are not storing the image as a blob but rather as an
> object in some object storage.
>
>
>> But after uploading a new image the old image is still their but as for
>> my convention if a user upload his new image the old image should not be
>> their, If anyone know please tell me How I can do that??
>>
>
> You just need to UPDATE the path of your image to the new one and make
> sure it is that path only that you serve back to the user. This goes well
> even if you are storing the image as a blob in your DB(but I prefer not to,
> it is a long debatable topic)
>
>
>> Thank you
>>
>> Regards,
>> Soumen
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAPUw6Wa%3DhcFc0r-n6m37w-ZiQL%3DtJh8JeXX1dc2x2-HbZVyocA%40mail.gmail.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAD%3DM5eQ3QhUTYkEf-Tn2KOiRd8niWcJbD75YuBtCtOvyq6ksjg%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPUw6WbsjZcXmdJX%2BBicmrHBh-2tCDfWcfaj0o1XkE9p0kt9oA%40mail.gmail.com.


Re: Image overwrite

2020-02-17 Thread onlinejudge95
On Sun, Feb 16, 2020 at 11:09 AM Soumen Khatua 
wrote:

> Hi Folks,
>
> I have a model where user can upload their image.
>

I am assuming you are not storing the image as a blob but rather as an
object in some object storage.


> But after uploading a new image the old image is still their but as for my
> convention if a user upload his new image the old image should not be
> their, If anyone know please tell me How I can do that??
>

You just need to UPDATE the path of your image to the new one and make sure
it is that path only that you serve back to the user. This goes well even
if you are storing the image as a blob in your DB(but I prefer not to, it
is a long debatable topic)


> Thank you
>
> Regards,
> Soumen
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPUw6Wa%3DhcFc0r-n6m37w-ZiQL%3DtJh8JeXX1dc2x2-HbZVyocA%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAD%3DM5eQ3QhUTYkEf-Tn2KOiRd8niWcJbD75YuBtCtOvyq6ksjg%40mail.gmail.com.


Image overwrite

2020-02-15 Thread Soumen Khatua
Hi Folks,

I have a model where user can upload their image. But after uploading a new
image the old image is still their but as for my convention if a user
upload his new image the old image should not be their, If anyone know
please tell me How I can do that??

Thank you

Regards,
Soumen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPUw6Wa%3DhcFc0r-n6m37w-ZiQL%3DtJh8JeXX1dc2x2-HbZVyocA%40mail.gmail.com.