Error on retrieving the uploaded files with auto-generated names to Sling by cURL -
I want to upload some binary files for sling with curl and I want the sling to be automatically filename Generate
I must use the post command from what I have read and set the destination to the folder:
`curl -x POST -d im2.png - U Admin: admin http: /191.168.23030: 8080 / content / * `
In the returned HTML, everything looks fine: position = 201 and content / / 9_1398511015890 Content Now when I type the file
Curl -X GET -u Administrator: Admin http://192.168.2.130:8080/content/9_1398511015890
Is an empty result (302 ml, content-length = 0) The went and Ta if I try with a browser, so it // 9_l3985ll0l5890 / redirect and generate a 403 error.
This also happens when I can use the I -T option to post a filename, but then I can not say to make a filename for me from sling. Any help is appreciated.
I would be happy to prove wrong, but AFAIK default sling POST servlet in this case with -d Does not use passed data
As you indicate that you should use the put method instead (curl-T), which does not automatically generate node names.
An alternative, if acceptable, will be to create a folder with an autogenerated name for the first time (using a parameter with a parameter), and then insert that file into that file.
If the additional path component is not correct, I am afraid that you have to create your own custom post or panel service for it ... and maybe this feature is for Apache sling ;-) < / P>
Comments
Post a Comment