search

Home  >  Q&A  >  body text

java - After the image is uploaded, 404 appears when accessing it immediately. After redeploying the project, it can be accessed normally.

1. I make a picture upload function. After the picture is uploaded, it will be placed under the project file.
2. After completion, an address for accessing the picture will be returned.
3. At this time, an error 404## will be reported when accessing this address. #4. Can be accessed normally after redeployment

Could you please tell me how to solve this problem?

習慣沉默習慣沉默2788 days ago820

reply all(2)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-17 10:02:47

    When you call redeployment, do you mean restarting the server or redeploying the webapp? Is it a system permissions issue?

    reply
    0
  • PHPz

    PHPz2017-05-17 10:02:47

    Can you "separate movement and stillness"?
    For example, in Nginx or Apache configuration: static files (pictures, css, js, etc.) are returned directly by the web server; dynamic requests are then forwarded to the backend.

    reply
    0
  • Cancelreply