Hello! I am trying to create a custom file-type field in the customer view that allows for file uploads. I created the āAttachment Fileā field of type File and added two variables to the editviewdefs.php file, which are enctype and the post method.
With all of this in place, the āattachment fileā field is visually displayed as intended, allowing files to be uploaded. However, when I try to view the file and click on it, a popup window opens with the message shown in the image, which, as I understand, means the file cannot be found.
My question is, how can I make the file be stored in the accounts table in the database? I see that the file is uploaded to the ā/uploadā folder, and I can view it from there, but not from the customer view in the CRM.
I canāt seem to figure out this small detail to understand it. Additionally, I canāt remove the file to select another one; it wonāt let me delete it. What am I missing?
I did it through code, specifying that this field is of type āfileā, but Iām missing a āfinal touchā to fully understand what I need to do for the part where it saves (it does save in the /upload folder), but it doesnāt let me view it when I try to open it from the view where I created it. Iām missing that detail, so to speak.
So in suitecrm filed get stored at upload folder in encrypted format. I donāt know if you can view it on moduleās page, but files usually get download on your local system to access.
Sometimes, the browsers stop downloading too. You can try it on different browser.
For that, you need remove button besides file upload field. Did you add that code too?
I tested it in different browsers, and I get that error which doesnāt allow me to view it.
No, I didnāt add it to the āremoveā button. When I defined the field as a āfileā type, the button, the eye icon, and the link that opens a blank window where the file should be displayed were automatically configured.
Sorry, but this is wrong . Please see my blog post. You can open the files, theyāre not compressed, theyāre not encrypted, your OS is probably just confused about how to open them because of the missing filename extension.
And there is a File Field in SuiteCRM, I donāt think add-ons are needed for this. If they are, then you can use a free add-on that even allows multiple files to be added.
Hello pgr! Thanks for your response. Iām going to read your blog to better understand it and see if it helps with what Iām trying to do.
Iām attempting to create an attachment field because I was asked to include it within the Accounts module as just another field, but in the Studio, thereās no āfileā field type. Thatās why Iām trying to do it by code, like the free add-on you mentioned.
Regarding the recommendation about the free add-on, Iāve also seen it and tried to use it in the CRM, but it didnāt work because the CRM version Iām using is 7.14.4-debian. The free add-on isnāt compatible with this version. I wish it workedāI would be using it!