i need to set a specific name for the uploaded file

sales2010

Well-Known Member
Hello,

I need to use the fileupload element in order to upload a csv file to the webserver. Then, a php file will use this csv file in order to import content into a table. At the end, the uploaded info will be displayed into a pdf file.

I need to specify the filename that should be uploaded by the users, for example the name of the file might end with userid. There are over a 100 users and each of them can upload several files each day.

I was thinking that if i can set the name of the file then i can add a condition into the php file..

Thank you
 
Is there a reason not to use the CSV feature to import the data? At least, in that case, you have a control of the coherence between the file and your table, while with your setting, you may get surprises.
 
i need to force the users to upload this file while they navigate through a form. I made a link to the list where they can use the csv feature, but they are not using it.

And i can't use the repeat group option because the csv file usually have over 100 rows..
 
You can define the upload folder containing the userID (so every user has his own folder), would this help?
 
i tested this option, but i need more as long each file is different...

what i'm thinking it's an option to rename any uploaded field so each file will be like filename_{rowid}_userid

if is not possible, i will skip the filename and use only {rowid}_userid or only {rowid}
 
you could use a php form plugin to rename the file, use the onafterprocess and just call JFile to rename it. Would that work for you?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top