Page 1 of 1

Unique file names for uploads according to user session

Posted: Thu Sep 14, 2017 11:36 am
by cheemingyong

everytime i do a file upload lets say the name of the file upload is img_xxxx.jpg

but another user who is logged in may also upload img_xxxx.jpg and overwrite my
upload because we are sharing the same upload folder.

how do i prevent this problem ? can i like assign a filename which i can tag
the session id to the name of the file that is uploaded by modifying ewupload.cs ?
and this new filename will be saved in the database instead ?


Re: Unique file names for uploads according to user session

Posted: Fri Sep 15, 2017 9:31 am
by Webmaster

You can use the Row_Inserting / Row_Updating server events to change the upload file name. The upload file name can be accessed in the server events via rsnew["<FieldName>"]