Hi Everyone,

I'm working on interface where users can upload basically any kind of attachment file. I was playing with the Zend_File_Transfer where I'm using one generic temp dir (via setDestination) to upload and once everything's valid I'm renaming the uploaded file to the proper dir. So far everything ok.

What I'm concerned about is that I think I have no control on multiple concurrent uploads via different users. In other words, what if the uploading original file name is the same among multiple users?

AFAIK PHP natively solves this issue with giving each uploaded file a unique name ($_FILES['tmp_name']) where I don't have to worry.

Is this issue somehow handled in Zend_File? If not, what would you suggest as best practice to avoid such conflicts? Or am I overseeing something?

I know I can always create a unique temp dir, but that doesn't feel right...

Thanks in advance.

Regards,
Marian

Reply via email to