Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8700247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:08:08+00:00 2026-06-13T02:08:08+00:00

This is the first time I am building a web app for the sole

  • 0

This is the first time I am building a web app for the sole purpose of processing user uploaded files and I have a few questions in regards to how this is normally done:

  1. Are there any security issues that I have to take into account? The files to be processed are in essence text files that my app will read line by line. Should I limit the file upload extension and/or is there any other precautions I should take into account?

  2. What is the best organization method for uploaded files? These files do not need to be stored permanently in my app so should I just dump them in a general “Data” folder and delete whatever is no longer needed?

  3. Are there any other important aspects to building web apps with similar functionalities that I’ve missed?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T02:08:09+00:00Added an answer on June 13, 2026 at 2:08 am
    1. The only security issue you have to watch for is inserting the raw text (without data scrubbing to prevent SQL injections) into the database. If there is no database involved, you should be fine. As for extensions, limiting extensions is really a poor top-level filter. It’s good to have, but it’s only peering skin deep into what the file really contains. A file size limit would help also.

    2. Saving to the disk can be costly with a large amount of transactions, but on the other hand, it will clutter your server memory less as more requests/more threads are being used. You can also work with the files in-memory, but for large files, it may end up being detrimental. Consider what you’re working with and choose the best approach.

    3. Define a timeout so that large uploaded files won’t be occupying unnecessary server processes when in the end it’s too large anyway.

    I am assuming that you’re working with ASP.NET’s FileUpload control. Bear in mind that the file does not persist through postbacks (to prevent a security loophole), so the user has to keep browsing to the file each time the page is requested. This is a nuisance if you have server-side validators.


    Edited to answer comment:

    By working in-memory, I am talking about manipulating the file uploaded purely through code without resorting to saving it physically on the server’s disk.

    For instance, if you’re using a FileUpload control, then the user’s file can be accessed through a Stream object FileUpload.FileContent or as a byte array FileUpload.FileBytes (API Reference). Since that’s a Stream you can just read the file on the fly without having to save it first.

    Markup:

    <asp:FileUpload ID="fileUploadControl" ToolTip="Upload a file" runat="server" />
    

    Codebehind:

    If fileUploadControl.HasFile AndAlso _
       (fileUploadControl.FileName.ToLower().EndsWith(".txt") OrElse _
        fileUploadControl.ToLower().FileName.EndsWith(".dat")) Then
        SaveThisToDataBase(fileUploadControl.FileName, fileUploadControl.FileBytes)
    End If
    

    See? No need to save to the disk at all. fileUploadControl.FileBytes contains a bytearray of the data uploaded.

    If you wanted to save to a file, then you can just use the stream to write to the disk.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First time building a user interface, had a few general questions 1) Does it
While building this web service and the app that calls it, we have noticed
I'm building a web app using EF Code First and ASP.NET MVC. I have
This is my first time building a website and using CodeIgniter for a school
This is my first time building an authenticated API and I'm running into a
I am building a web app with jquery mobile. On one page I have
This is my first time comparing dates in Objective-C. I've been searching the web
This is my first time I need to create a cutscene system. I have
This is my first time building a loop in jQuery or js, and I've
I am building a web app that takes several tiff image files and merges

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.