Hi everyone,
Just to bump this – can anyone confirm that the upload of a generic resource
file, e.g. css file to the workspace via REST endpoint:
PUT
{geoiserver_host}/rest/resource/workspaces/{workspace_name}/styles/{css_filename}
works, meaning: the received file is the same as the file being uploaded,
without any file content changes?
My example call:
curl -XPUT -u admin:geoserver -F "[email protected]"
http://localhost:8080/geoserver/rest/resource/workspaces/my_workspace/styles/test.css
Cheers,
Mickey
From: Andrea Aime <[email protected]>
Date: Friday, 19. October 2018 at 18:52
To: Miodrag Vidanovic <[email protected]>
Cc: GeoServer Mailing List List <[email protected]>
Subject: Re: [Geoserver-users] Resource upload via rest API saved in a
web-envelope
Hi,
I have not tried myself to verify, but as far as I remember, if you want to
upload multiple files (style and its
icons) you have to put everything in a zip file and then upload that. No other
multi-file approach is supported.
Cheers
Andrea
On Fri, Oct 19, 2018 at 6:09 PM Miodrag Vidanovic
<[email protected]<mailto:[email protected]>>
wrote:
Hi!
I'm using GeoServer 2.14.0 and I am trying to upload a couple of css and png
files to the workspace. For that purpose, I'm using the /resource/ rest API.
The files are uploaded - they are saved at the right place, they are getting
the right file name, but their content is mangled. It seems that they are saved
together with their multipart web-envelope:
--4aeb5300728e29c5bb0af8225aa3b225
Content-Disposition: form-data; name="icon2"; filename="icon2.png"
.PNG
{the rest of the png binary file}
--4aeb5300728e29c5bb0af8225aa3b225--
The same happens with css files, so none of them can be really used. If I edit
the file and remove that leading and trailing text, the file works perfectly.
For upload I have tried reading files as binary and as ascii, tried to set all
sorts of content types, from mime detected, generic text/plain (for css) or
generic application/octet-stream for binary files and, of course,
multipart/form-data. Also without that kind of a header. I have tried upload
with curl as well, to exclude my code. I have also tried to perform the same
operation on GeoServer 2.13.2, but sadly, always with same results. What am I
doing wrong, can't believe that this is a bug nobody saw before?
Cheers!
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf
Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU)
phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549
http://www.geo-solutions.it http://twitter.com/geosolutions_it
------------------------------------------------------- Con riferimento alla
normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento
generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza
inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è
un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo
scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo,
ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene
notizia. This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential or
otherwise protected from disclosure. We remind that - as provided by European
Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or
the information herein by anyone other than the intended recipient is
prohibited. If you have received this email by mistake, please notify us
immediately by telephone or e-mail.
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users