locked
File System Ptoject RRS feed

  • Question

  • User197255166 posted

    Hello friends I have a question, I wanted to ask if I can have it in my head.

    I want to make a file upload system. But the user will upload files to my site but will write their site in textbox and upload the file.

    Can I save the files by saving the database?

    Is it possible to access that file as www.usernamesite.com / filename

    Can you give an example.

    Sunday, June 21, 2020 1:56 PM

All replies

  • User475983607 posted

    Your question needs clarification.  If the file URL located on a remote host then what's the purpose of storing the file in a database?   You can get the file at any time from the remote host.

    If you are asking how to download a file using C# and HTTP then read the docs. 

    https://docs.microsoft.com/en-us/dotnet/api/system.net.webclient.downloadfile?view=netcore-3.1

    If you are asking how to store a file in a database table using C# this is also well documented.

    https://stackoverflow.com/questions/2579373/saving-any-file-to-in-the-database-just-convert-it-to-a-byte-array

    Sunday, June 21, 2020 2:12 PM
  • User409696431 posted

    Your question needs clarification.

    I want to make a file upload system.  Letting a user upload files to your server from their machine is well documented.

    But the user will upload files to my site but will write their site in textbox and upload the file.   The addition here is that you want to have the user write their site in a textbox, which they can certainly do - if they have a site.  Why assume they do?  Or they may have multiple sites.   The purpose here is unclear.

    Can I save the files by saving the database?   No, you can't save the files by saving the database.  If you meant, can you save the files inside the database, yes you can, if you have a reason to do so.  This is also well documented.

    Is it possible to access that file as www.usernamesite.com / filename    No, if you mean www.usernamesite.com is the user's site.  The only way you could access a file that way is if it were stored on the user's site in that location, and that would be completely independent of anything you would do (and again, only be possible if the user had a site).

    Sunday, June 21, 2020 10:12 PM
  • User197255166 posted

    Hi,

    let's do a project like this.

    User will add database file. He will also write his own site. Other users will then view this file.

    I will extract this file and the website link written by the user as qr code.

    I'm researching how this can happen.

    Wednesday, June 24, 2020 9:35 PM