FileSystem Storage - Files not getting displayed in physical

Posted by Community Admin on 04-Aug-2018 11:49

FileSystem Storage - Files not getting displayed in physical path

All Replies

Posted by Community Admin on 14-Dec-2012 00:00

We are using Sitefinity to upload the documents using Sitefinity API. In the administration setting we have changed the Storage to use FileSystem and have specified a local file path.
Files gets uploaded successfully to Sitefinity and we can see them under Contents-->Documents & Files.
Problem is we don't see these files in the physical local path. I was under the impression that files would be saved in this path.
Do let me know if I am missing any settings or do I need to write any further code? Its urgent!

Posted by Community Admin on 14-Dec-2012 00:00

What do you mean?  The files should be under ~/App_Data/Storage/FileSystem/<guid> no?

It's a "file system" provider so it physically stores the files in the above folder, it doesn't copy them to any sort of custom local path based on library name (IMO that would cause havok...user creates a library called "Images", "Scripts", or god forbid "Sitefinity" for example).

Whats the problem you're having, needing to extract the file out?....or browsing?

Posted by Community Admin on 17-Dec-2012 00:00

By default for the FileSystem storage, files should be under ~/App_Data/Storage/FileSystem/<guid> no. I have changed this path to I:/MyStorage. Now I don't see any files getting uploaded in I:/MyStorage folder.
I assume files are still  getting saved to the database as the database size has increased.  Where in the database I can check if the files are getting saved in database.
I want the files to be saved in I:/MyStorage folder and not in database.
I hope this clarifies the question. Do let me know if you need any further details.

Posted by Community Admin on 19-Dec-2012 00:00

Hi,

The images are saved in the file sytsem after the upload as byte chunks as thuis is the data that sitefintiy can move in and out of its blob storage provider. The chunk is a part of the image only stored as a separate unit and this every image after upload is converted to a number of chunks (depending on the image size) that are actuall the file stored in the file system

Kind regards,
Stanislav Velikov
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 23-Jun-2016 00:00

Can this data be accessed as any other data? like a image file or word document on the physical location.

Posted by Community Admin on 23-Jun-2016 00:00

@dhaeal Yeah there's a filesystem folder under appdata, they are all in there. Only problem is they are named as their guids with no extension... So it's tough 

Posted by Community Admin on 28-Jun-2016 00:00

Hi,

To get the images in a format different than a binary file they must be queried using images API and download them.
Use librariesManager.Download method.

LibrariesManager librariesManager = LibrariesManager.GetManager();
            var listOfImages = librariesManager.GetImages().Where(i => i.Status == ContentLifecycleStatus.Live && i.Visible == true);
 
            foreach (var image in listOfImages)
            
                var imageBinaryStream = librariesManager.Download(image);
            


Regards,
Stanislav Velikov
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 11-Nov-2016 00:00

I want to  check the pictures  inside of the file system. That's mean i want to look every pictures  for this picture inside of the file system or not. If some pictures not in file system, write "Not in this system". How can I check it with codes. Is it possible?

Posted by Community Admin on 14-Nov-2016 00:00

Hi David,

You want to find images which have a record in the database, but for some reason don't have the physical file (broken reference)?

If yes, you can use this snippet of code:

 

foreach (var image in librariesManager.GetImages())
    try
    
            LibrariesManager.GetManager().Download(image.Id);
    
    catch (FileNotFoundException)
    
        //Do something with this image
    

 

Of you want to check if this picture stored in file system or somewhere else (DB, Azure, etc)?

Posted by Community Admin on 15-Nov-2016 00:00

 

Posted by Community Admin on 18-Nov-2016 00:00

Hi Victor,
Actually i want to check that the images in sitefinity are in the file system. Can I do that?

Posted by Community Admin on 18-Nov-2016 00:00

Hi David, sorry for the long answer. Somehow I missed your question. Image object has property BlobStorageProvider, you just need to check this property. If it is "FileSystem", then this image stored in the file system

var librariesManager = LibrariesManager.GetManager();
foreach (var image in librariesManager.GetImages())
    if (image.BlobStorageProvider == "FileSystem")
    
             // do something            
    

 

Posted by Community Admin on 18-Nov-2016 00:00

Hi Victor, I want to do litle bit different. There are images in my test site and i want to look these images are in the file system or not ? So, in my test site images should be same with in  my file system images.

Posted by Community Admin on 06-Dec-2016 00:00

Hi Steve,

There are images in my test website and i want to look,  Are these images in the file system or not ? So, in my test website images should be same with in  my file system images. How can i do that? Can u give me some expression ?

Posted by Community Admin on 06-Dec-2016 00:00

@David

If you have picked the file system provider then yes they are on the filesystem under App_Data\Storage\Filesystem (or something to that effect, might be App_Data\Sitefinity\Storage\Filesystem)

Not sure what the question is though?

Posted by Community Admin on 06-Dec-2016 00:00

Hi,

I'm using sitefinity in my website. I want to check  which photos both of in my website and in my filesystem. But if the photos on my website are not in the filesystem program will give an error. A little hard to explain in this situation.

 

This thread is closed