+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / FileSystem Storage - Files not getting displayed in physical path

FileSystem Storage - Files not getting displayed in physical path

16 posts, 0 answered
  1. Pascal
    Pascal avatar
    9 posts
    Registered:
    22 Nov 2010
    14 Dec 2012
    Link to this post
    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!
  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    14 Dec 2012 in reply to Pascal
    Link to this post
    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?
  3. Pascal
    Pascal avatar
    9 posts
    Registered:
    22 Nov 2010
    17 Dec 2012
    Link to this post
    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.
  4. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    06 Dec 2016
    19 Dec 2012
    Link to this post
    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
  5. dhawal
    dhawal avatar
    4 posts
    Registered:
    03 Jun 2016
    23 Jun in reply to Stanislav Velikov
    Link to this post
    Can this data be accessed as any other data? like a image file or word document on the physical location.
  6. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    23 Jun
    Link to this post
    @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 
  7. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    06 Dec 2016
    28 Jun
    Link to this post
    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
     
  8. David
    David avatar
    0 posts
    Registered:
    11 Nov 2016
    11 Nov
    Link to this post
    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?
  9. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    14 Nov in reply to David
    Link to this post

    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)?

  10. David
    David avatar
    0 posts
    Registered:
    11 Nov 2016
    15 Nov
    Link to this post

     

  11. David
    David avatar
    0 posts
    Registered:
    11 Nov 2016
    18 Nov in reply to Victor Leontyev
    Link to this post
    Hi Victor,
    Actually i want to check that the images in sitefinity are in the file system. Can I do that?
  12. Victor Leontyev
    Victor Leontyev avatar
    65 posts
    Registered:
    01 Jul 2014
    18 Nov in reply to David
    Link to this post

    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            
        }
    }

     

  13. David
    David avatar
    0 posts
    Registered:
    11 Nov 2016
    18 Nov in reply to Victor Leontyev
    Link to this post
    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.
  14. David
    David avatar
    0 posts
    Registered:
    11 Nov 2016
    1 day and 8 hours ago in reply to Steve
    Link to this post

    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 ?

  15. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    1 day and 1 hour ago in reply to David
    Link to this post

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

  16. David
    David avatar
    0 posts
    Registered:
    11 Nov 2016
    21 hours ago in reply to Steve
    Link to this post

    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.

     

16 posts, 0 answered