Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

All feel good, why the difference between the last step? #190

Closed

Description

@wspnet

http://localhost:48118/resize/Data/qibuchina/upload/image/001.jpg

public async Task<IActionResult> Index(string imagePath= "Data/qibuchina/upload/image/001.jpg", int maxWidth=387, int maxHeight=516)

All feel good, why the difference between the last step?

An unhandled exception occurred while processing the request.

Exception: Call to Node module failed with error: Error: Invalid width (1 to 16383) image/jpeg
at Sharp.resize (F:\Qibu\src\Qibu.Web\Node\node_modules\sharp\index.js:847:13)
at module.exports (F:\Qibu\src\Qibu.Web\Node\resizeImage.js:6:10)
at C:\Users\weisp\AppData\Local\Temp\tmp9D81.tmp:108:19
at IncomingMessage. (C:\Users\weisp\AppData\Local\Temp\tmp9D81.tmp:127:35)
at emitNone (events.js:67:13)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:921:12)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
MoveNext

Stack Query Cookies Headers
Exception: Call to Node module failed with error: Error: Invalid width (1 to 16383) image/jpeg at Sharp.resize (F:\Qibu\src\Qibu.Web\Node\node_modules\sharp\index.js:847:13) at module.exports (F:\Qibu\src\Qibu.Web\Node\resizeImage.js:6:10) at C:\Users\weisp\AppData\Local\Temp\tmp9D81.tmp:108:19 at IncomingMessage. (C:\Users\weisp\AppData\Local\Temp\tmp9D81.tmp:127:35) at emitNone (events.js:67:13) at IncomingMessage.emit (events.js:166:7) at endReadableNT (_stream_readable.js:921:12) at nextTickCallbackWith2Args (node.js:442:9) at process._tickCallback (node.js:356:17)

Activity

  1. SteveSandersonMS commented on Jul 18, 2016

    @SteveSandersonMS
    Member

    From the error message:

    Error: Invalid width (1 to 16383) image/jpeg at Sharp.resize
    

    ... it looks like the value you're passing for "width" is the string "image/jpeg". Of course, it should be a number, not a string :)

    Check the .NET code that's calling InvokeAsync and the parameters it's passing, and make sure it matches up with your Node code that's receiving these parameters. My guess is that you're trying to send a different number of parameters than you're receiving, or you're trying to receive them in a different order than they were sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ Proxy