Where besides BizFormFiles would a file uploaded as part of a file submission be found?

Stephen Price asked on June 11, 2020 22:38

I have a file uploaded as part of a form submission that I cannot locate in the files of my Kentico instance. When I open the link found in the form response that the file upload was part of, it opens right up in a new tab. But when I extract the file GUID from the link and search ~\CMS<sitename>\BizFormFiles, a I can't find any file with a matching GUID. Where else might this file be stored?

This is important bc I am planning to separate all my content files from my application files to simplify my development and CI process.

Recent Answers


Brenden Kehren answered on June 11, 2020 22:59

Typically they are stored in <root>/<sitecodename>/files in no particular order. They use the first 2 characters of the GUID for the file to place it in a folder.

0 votesVote for this answer Mark as a Correct answer

Stephen Price answered on June 11, 2020 23:30

Unfortunately, it's not there. This is a BizForm file uploaded as part of a form submission. From the form response I get the link:

https://sitename.com/CMSPages/GetBizFormFile.aspx?filename=<some GUID>.pdf&sitename=sitename

That link works, but when you search anywhere in \CMS\ for that GUID, nothing comes up. I know that page attachments under workflow get moved to CMS\App_Data\VersionHistory, is something similar happening here?

This instance did once have all files stored in the database, but then I changed that setting and moved page attachment binary data out of the database and onto the filesystem via a custom module I wrote. Are form files ever stored in the database?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on June 11, 2020 23:38

You can also check in the <root>/CMSFiles directory. If it's not there, then check to see if you're storing your filed in the database. If so, then those files are not available in the file system.

0 votesVote for this answer Mark as a Correct answer

Stephen Price answered on June 12, 2020 00:04

What db table would hold that data? I might need to migrate it out of the db.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on June 12, 2020 05:08

You can go to the System > Files > Attachments and you may find your attachments in there. You can force the attachments in the database to be stored in the file system.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on June 12, 2020 11:07

I would check whether there is not a custom folder set for the form files - link to documentation.

0 votesVote for this answer Mark as a Correct answer

Stephen Price answered on June 12, 2020 21:05

Juraj,

There isn't a custom folder set. And the file I'm looking for was uploaded through a form, not a page attachment. All I want to know are the places a form file could be. In other words, what's the algorithm for resolving a form file link? Where does the CMS look under what conditions?

I only know one place to look and I can't find this file. I need to know because I am planning to move all those files to a custom folder because we have ~170GB of content files mixed in with our application files and it makes CI and development a nightmare. If I'm missing this file, I'm likely missing others.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on June 15, 2020 05:33

I sent you link to the documentation since also describes where the form files are stored by default: "Files uploaded by website users into forms are always stored in the file system. The default location is ~/< site code name >/BizFormFiles. You can customize the location in Settings -> System -> Files -> Custom form files folder."

Since you could not find it, I thought there could be some custom folder set.
In the link, there is the getbizformfile handler (~/CMSPages/GetBizFormFile.aspx?filename=< some GUID > .extension), which is looking on the disk into the default or custom form files folder and looks for the file's GUID as this is used as the file name.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.