Developer forum

Forum » CMS - Standard features » Handle Files field types on Users

Handle Files field types on Users

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a project where I am using a few custom fields of type "File" on the user.

The logic for handling the UserImage seems to be very specific for the Image field.

For the custom fields, I see that the template tag is generating an Input field and I can select the file. The file is uploaded according to the settings in GlobalSettings.

I also see that the file is renamed upon uploading. The name of the file is changed to follow the system name of the field.

What I cannot figure out is how do I replace the file. apparently, if I try to upload a new file, the old file is not replaced. Is there another setting I have to configure for allowing deletion/replacement of the old file?
I see that for the standard Image field, there is a hidden input "DeleteImage".
Thank you,

Adrian


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Adrian

If you upload a new file to the same field with the same settings, the file should be deleted and the new one uploaded. There is no support for deleting files.

This is the logic:

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Thank you very much.

Adrian

 

You must be logged in to post in the forum