Welcome Guest, Not a member yet? Register   Sign In
filename length, database
#6

[eluser]SPeed_FANat1c[/eluser]
then about renaming - what technique do you use to avoid duplicates? I now think I could rename them to 1.jpg, 2.jpg and when I add new file, I will have to search in db for the biggest number. Hmm, string manipulation - I'll have drop the exctention. Or maybe I should save it without an extention, even if file does not have extentions it is still the same file. Then I could simply find the biggest number, add 1 to it and save the new file.

Another way would be generate random file name, then check in db if it is not used, which will rarely be, and if not used then save.


Messages In This Thread
filename length, database - by El Forum - 10-20-2010, 09:41 AM
filename length, database - by El Forum - 10-20-2010, 01:59 PM
filename length, database - by El Forum - 10-20-2010, 03:49 PM
filename length, database - by El Forum - 10-20-2010, 04:08 PM
filename length, database - by El Forum - 10-20-2010, 05:01 PM
filename length, database - by El Forum - 10-21-2010, 04:47 AM
filename length, database - by El Forum - 10-21-2010, 04:52 AM
filename length, database - by El Forum - 10-21-2010, 05:16 AM
filename length, database - by El Forum - 10-21-2010, 02:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB