Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

Unique File Names
https://www.tinywebgallery.com/forum/viewtopic.php?f=13&t=1360
Page 1 of 3

Author:  nphnet [ 22. Jan 2008, 21:36 ]
Post subject:  Unique File Names

Congratulations on an excellent tool.

I would like to know if it is possible to uniquely name a file? If two users upload the same file (configured so user cannot see remote files) It currently just overwrites the filename on the server.

Author:  TinyWebGallery [ 23. Jan 2008, 22:43 ]
Post subject: 

right - normaly you get a warning if the remote view is shown.

But you can easily extend the tfu_upload.php not to overwrite files but make e.g number it.

/Michael

Author:  christifur [ 9. Oct 2008, 16:25 ]
Post subject:  need this

I really need for files not to be able to be overwritten.

Code for this exists?

Author:  TinyWebGallery [ 9. Oct 2008, 16:47 ]
Post subject: 

Hi,

No - Because it's really easy. I don't know what you want. I can make an individual adoption for you.

/Michael

Author:  christifur [ 9. Oct 2008, 16:49 ]
Post subject: 

I just would like that if two users upload the same file or a single user uploads 2 files with the same name it will do something like:

uploadedpic.jpg
uploadedpic(1).jpg

That would work.

Also I really need the enterprise version sent to me, I paid for it a few hours ago, if you could process my order that would be awesome..

One last question. How can I remove the "Joomla Flash Uploader" on the top bar?

Many thanks love the app.

Author:  TinyWebGallery [ 9. Oct 2008, 17:21 ]
Post subject: 

Hi,

I do registrations when I come home because this stuff is on my other pc. I think in ~ 2 hours you have everything :).

the title can be changed in the registered version.

I pasted you the code I use in tfu of you copy files to the same folder. Because there I do exactly what you need.

if ($ff == $dest) {
$nr = 2;
$dest = $folder . '/Copy of ' . basename($ff);
while (file_exists($dest)) {
$dest = $folder . '/Copy (' . $nr++ . ') of ' . basename($ff);
}
}
if (@copy($ff, $dest)) {
$done++;
} else {
$error++;
}

You only have to adopt this to you need and use this in tfu_upload.php

/Michael

Author:  TinyWebGallery [ 9. Oct 2008, 17:22 ]
Post subject: 

it's actually only this you need:

$nr = 2;
$dest = $folder . '/Copy of ' . basename($ff);
while (file_exists($dest)) {
$dest = $folder . '/Copy (' . $nr++ . ') of ' . basename($ff);
}

Author:  christifur [ 9. Oct 2008, 17:24 ]
Post subject: 

Im using JFU that the same as TFU?

Also, please explain exactly how to append that code... I'm newb. :)

I assume I should just wait till I get my registered enterprise version to append it.

Thanks for the responses!

Author:  TinyWebGallery [ 9. Oct 2008, 17:28 ]
Post subject: 

under the hood - yes.

JFU is the Joomla version of TFU which is adapted and extended to work with Joomla.

you don't have any coding experience? because this code has to be modified a little bit and placed in the right place ...

/Michael

Author:  christifur [ 9. Oct 2008, 17:32 ]
Post subject: 

no but I have modified lots of code, but I always have no clue what im looking at.. haha!

I'm really good at following instructions though.. so If you just tell me exactly where to stick it and what to change, I can do it.

Author:  christifur [ 9. Oct 2008, 20:03 ]
Post subject: 

I have set the max file size to 100 and edited my .htaccess to allow php to take 100mb.

For some reason JFU says MAX files size 97mb. any idea why?

Author:  TinyWebGallery [ 9. Oct 2008, 20:14 ]
Post subject: 

100000 k are not 100 MB.

#removed_broken_link

/Michael

Author:  christifur [ 9. Oct 2008, 20:15 ]
Post subject: 

oh yeah duh lol

sorry

Author:  christifur [ 9. Oct 2008, 20:51 ]
Post subject: 

so after applying my license, for some reason the files upload but are not in the directory after upload.

How can I diagnose this?

Author:  TinyWebGallery [ 9. Oct 2008, 20:52 ]
Post subject: 

before it worked?

/Michael

Page 1 of 3 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/