v1/files/copy not working anymore

Started by axel.hennig, March 16, 2022, 11:13:08 PM

Previous topic - Next topic


Hi everybody,

due to the fact that I'm an absolute beginner regarding JavaScript / IMatch programming I'm not sure if this is a bug or if I just don't know how I get this to work.

I've got an app (since 2-3 years) which uses the v1/files/copy endpoint. The app always worked as expected, but right now it is not working anymore (IMatch 2021.15.2).

I've tested the following code in Chrome:

This gives the following error in the browser:

  "message":"Unknown or unsupported method."
}Error 404: Not Found
Not found

When running an app with v1/files/copy it returns (in DevTools) an error 400 (Bad request) and refers to jquery.min.js:2 (I guess the 2 means line 2).

Due to my limited programming skills I'm not able to get deeper into this.

My question: Could someone please check if the v1/files/copy endpoint is working (and how)?



This is a POST request. You cannot make POST requests with your web browser.

No change in this endpoint for a long time, and a quick test shows that it works just fine. I've used this code to copy the selected file(s) to a folder in my database:

    idlist: IMatch.idlist.fileWindowSelection,
    targetpath: 'C:\\data\\Image\\Test',
}).then(function(response) {
},function(error) {
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook


Thanks Mario, together with the code you provided I was able to get it to work.