Question about file management

Hey everyone,

I start using the web to lead form, still need to customize it a lot, but he does his job.

My question is about files.

My lead will have to upload 3 file :
2 Files from their organization, they upload it manually in the form.
1 Files that I generate from the form (with FPDF framework)

In my contact form file type are :
pdf|jpeg|png|bmp|fax|img|jpg|pbm limit:2mb

But they mostly use pdf, png, jpeg and jpg.

So my question is :
Should I try to use the Documents module OR should I try the image field within the lead module ?

Of course, after lead conversion, I will need to have those file in the future account. (That’s why I think the Documents module is better)

For now I technically don’t know how I will proceed to have this to work since the web to lead form doesn’t support file upload for security reason ( see : Web to lead form does not seem to support field type image )

Hope someone can help ! I will update this topic on how I will proceed and fix my issue.


If you question about management. I think that the module Documents is intended for a different use.

  1. The module Documents is saving internal documents and is supported versions.
  2. You wrote about specific document type for Lead.

I am using custom module for the documents or module Notes usually.

1 Like

Thanks for both of your answer,

So I don’t need at all revision and all that specific stuff Documents module offer, it will just be some mandatory file from organization that I need to have.

The bad news is that I already use the Note module and customized it for another use.

My last chance is the image field directly in the lead module ?

@p.konetskiy Do you think the image field within the lead module is not a good option too ? Or the note module is better ?

as I saw here how file are stored

IDK how to do cause I will have those 3 files for all my client (more than 6K)…


I think it’s possible if the files refer to the lead only. But I don’t know all logic of your system.

If you want to load multi files you can use the decision:

1 Like

Wow thanks for this, didn’t aware of your work @p.konetskiy ! :slight_smile:

I can maybe use your “Collection files” for the 3 files, some questions:

  • Do it support the lead conversion to account ?

  • Do the delete work clean ? I mean do your field delete every entry on DB and the file into the upload/ folder ? I will maybe have to delete some users file and want this to be clean (cause I will have more than 18K of files.)

  • Can I upload file via API to your field “Collection files” ?

All in all I will install yours addons cause am too curious to test it !


No, by default. There are two different modules - parent which the field type and child with files. You can customize the function handleSave of file modules/Leads/views/view.convertlead.php. I think it’s easy enough.
You should create the field type to both modules and add relationship when the record is converted. You will two links to one file.

Using standard for SuiteCRM mechanizm for delete record. The record is marking as deleted. The file is deleting fully using php command unlink.

1 Like