Open Closed

Incorrect proxy generated for file upload API: Cannot find name 'StringValues'. #1174


User avatar
0
dev03 created
  • ABP Framework version: v4.0.2
  • UI type: Angular
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:

I tried to upload a file using IFormFile, but an error occurred when generating the proxy, See this:

Did I miss something? The API like this:

Found an issue on github: https://github.com/abpframework/abp/issues/6384

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

12 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi coeusli

    You should use IRemoteStreamContent in app service. Then follow https://github.com/abpframework/abp/issues/6384#issuecomment-739245736

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    dev02 created

    Using iRemoteStreamContent, according to the documentation, the following error occurs

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi dev02

    What is your angular code that call this method?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    dev02 created

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    dev02 created

    Try the jQuery call, same error

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You need to pass the file in the request body before v4.3.

    example:

    var settings = {
      "url": "https://localhost:44362/api/upload-file",
      "method": "POST",
      "headers": {
        "Content-Type": "image/png"
      },
       "data": "<file contents here>"
    };
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    

    You can use FormData after v4.3. https://github.com/abpframework/abp/pull/8302

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    dev02 created

    How can Ajax Data pass arguments without using FormData?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You can also copy code of PR to your project then you can use FormData .

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    dev03 created

    ** ABP Framework version Upgrade to 4.4.3**

    RemoteStreamContent wèishéme shì null?

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    1
    maliming created
    Support Team Fullstack Developer

    Try to use same paramter name.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    1
    dev03 created

    This is fine, thank you.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on October 05, 2026, 11:32
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.