Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kms69's avatar
Level 1

Update Image with put method via move() won't work in postman api

I am trying to update image through postman api but when I use move (), instead of storesAs(). I keep receiving an unknow error.

0 likes
7 replies
Snapey's avatar

Then you have an unknown problem

Snapey's avatar

why would you need to use patch?

kms69's avatar
Level 1

@Snapey because the update method won't work without patch/put method. It is working ok when no image is uploaded but when image is required it won't work.

Snapey's avatar

@kms69 what I mean is, just ditch the middleware, declare a POST route and send it to the update method.

1 like
kms69's avatar
Level 1

@Snapey so you recommend when working with api's use post instead of put/patch when images are required?

Snapey's avatar
Snapey
Best Answer
Level 122

@kms69 Well it could be argued that you are posting a new image, not updating an existing one.

So, POST verb seems fine for an image. Actually, using POST/PATCH/PUT makes absolutely no difference to your application, its only semantics.

1 like

Please or to participate in this conversation.