FileSystem Storage - Files not getting displayed in physical path - Bugs & Issues - Bugs & Issues - Progress Community

FileSystem Storage - Files not getting displayed in physical path

 Bugs & Issues

FileSystem Storage - Files not getting displayed in physical path

  • FileSystem Storage - Files not getting displayed in physical path
  • 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!
  • 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?
  • 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.
  • 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
  • @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 
  • Can this data be accessed as any other data? like a image file or word document on the physical location.
  • 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
     
  • 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?
  • 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)?

  •  

  • Hi Victor,
    Actually i want to check that the images in sitefinity are in the file system. Can I do that?
  • 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            
        

     

  • 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.
  • @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?