Filename

Hi,

I am using attachment_fu plugin for uploading files. Can anybody tell me
how to access the filename in the Model before the file gets uploaded ?
Actually I want to a system where the users will be able to upload files
if the filenames matches with the existing filenames already stored in a
different table. Can anybody advice me on how to solve this problem ?

Thanks
Saurav

as far as i understand, using attachment_fu, you cannot get the
filename in the Model BEFORE the file gets uploaded.

One solution to you problem could be :

i. Make the use enter the filename (or path) in a textfield.
ii. Make an ajax call to the server with the filename, to verify
whether it exists in the database.
iii. Enable the upload button / display error message depending on the
result of the ajax call.

Thanx for the solution.BTW is there any other plugin which will allow me
to capture the filename before it gets uploaded in the database ??

Saurav

Unnikrishnan Kp wrote: