locked
Looking for recomendation for file managment RRS feed

  • Question

  • User657329123 posted

    Hello there,

    I'm looking to develop web interface to a folder on web server, so that users can see files inside that folder. User should be able to click and view the files (mostly PDF's). Users should be able to upload to this folder and delete files.

    Is there any free extension out there? What would be the best way to implement this?

    Joe

    Thursday, January 10, 2019 3:58 PM

All replies

  • User-943250815 posted

    Just a recommendation, if there is any chance to have thousands or hundred thousands files in a single folder, maybe you need to store files on database instead of disk folder.
    For such volume, NFTS is not faster enough.

    Thursday, January 10, 2019 5:34 PM
  • User657329123 posted

    There will be hundred's of files. Majority of the files will be updated by an automated dump on a daily basis to a folder. Some of the files will be manually uploaded. I don't think storing files in database will work. 

    I just want to provide users a list of PDF files, so that they can view them in browser in order to copy the URL and URL is pasted somewhere else in the application.

    Thursday, January 10, 2019 5:54 PM
  • User475983607 posted

    I just want to provide users a list of PDF files, so that they can view them in browser in order to copy the URL and URL is pasted somewhere else in the application.

    Use the System.IO namespace to read the files into a collection.

    https://docs.microsoft.com/en-us/dotnet/api/system.io.directory.getfiles?view=netframework-4.7.2

    Pass the array of files to a View.  Use the native VS scaffolding to generate the HTML.

    Thursday, January 10, 2019 6:08 PM
  • User657329123 posted

    Do I need to create model to upload, delete and display files from a folder? I do not want to store any info in the database as who, when and which file was uploaded or deleted.

    If I decide to store who, when and which file info in the database, then I will need a model. Am I correct?

    Thursday, January 10, 2019 7:06 PM
  • User475983607 posted

    Do I need to create model to upload, delete and display files from a folder?

    Generally speaking, model is the M in MVC so yes you'll have models in an MVC application. 

    Aside from path and file names, files have created dates, sizes, and type attributes.   These attributes are nice to have in the UI and implementing a strongly typed View (passing a Model to a View) is rather convenient as it lights up intellisense.

    If I decide to store who, when and which file info in the database, then I will need a model. Am I correct?

    You'll have Models in the MVC application and Models in the persistence layer.  Assuming Entity Framework is used.

    Thursday, January 10, 2019 7:18 PM
  • User-474980206 posted

    one drive or google drive are the best implementations of this feature. they have security, upload, download and viewing support.

    Thursday, January 10, 2019 9:09 PM
  • User1520731567 posted

    Hi joegreen2005,

    You could use the ASP.NET file manager control in DevExpress to display and allow your end users to work with files on your web server easily. Give them the ability or restriction to edit, create, delete files and directories, as well as, upload files.It seems has a free trial.

    https://demos.devexpress.com/MVCxFileManagerAndUploadDemos/FileManager/GoogleDriveProvider

    https://demos.devexpress.com/MVCxFileManagerAndUploadDemos/

    Best Regards.

    Yuki Tao

    Friday, January 11, 2019 10:13 AM