• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Image upload problem

#3
[eluser]haris244808[/eluser]
[quote author="TheFuzzy0ne" date="1363956515"]The way you're doing it is going to be problematic. It assumes that:

a) A user will always upload a profile picture with the same name as the file they uploaded before, and
b) A user will never upload an image with the same name as another user's profile image.

You could name the file using the user's username or ID. That way you should be able to delete the previous file without ascertaining the file name first (since I assume it will be in the user's session), although I don't see why it would be a problem to perform an extra database query.[/quote]

a)Actually...if i upload another picture...it stores the new name in database not the old pictures name...
b) Thats ok...why do i need to upload an image with the same name as another users profile image?



Messages In This Thread
Image upload problem - by El Forum - 03-21-2013, 09:27 PM
Image upload problem - by El Forum - 03-22-2013, 05:48 AM
Image upload problem - by El Forum - 03-22-2013, 06:31 AM
Image upload problem - by El Forum - 03-22-2013, 07:14 AM
Image upload problem - by El Forum - 03-22-2013, 12:37 PM
Image upload problem - by El Forum - 03-22-2013, 01:13 PM
Image upload problem - by El Forum - 03-22-2013, 03:42 PM
Image upload problem - by El Forum - 03-23-2013, 01:38 AM
Image upload problem - by El Forum - 03-23-2013, 03:00 AM
Image upload problem - by El Forum - 03-23-2013, 03:11 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.