这是indexloc提供的服务,不要输入任何密码
Skip to content

I uploaded image to the server, but failed to bring images #1954

@yonghunJ

Description

@yonghunJ

-mean
-----server
--------- config
-------------config.js
-------- controllers
-------- data
-------- images <---I saved images here using "multer "package

I added this line in mean/server/config/config,js

  • app.use('images', express.static(path.join(__dirname,'/../images')))

When I try to access a static image from the browser=>localhost:4040/images
it gives me 401 Unauthorized error.

I don't know why it does not work.
Could you please able to give me an advice?

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