Skip to content

skip_existing_layers is documented in the upload API as functional but the code says otherwise #14377

Description

@lobenichou

Hello team,

Just want to clear up which of these statement is correct.

We have this line in the code:

"WARNING: The skip_existing_layers flag is not currently "

But the API doc still list skip_existing_layer as a functional flag.

FWIW, the flag does not work for me when uploading a raster and some json.

endpoint= os.getenv('BASE_URL_GEONODE') + "/uploads/upload/"
upload = {
         'base_file': (os.path.basename(path), open(file, 'rb'), 'application/octet-stream')
      }

payload = {'action': 'upload', 'skip_existing_layers':'true'}
res = requests.post(endpoint, auth=auth, files=upload, verify=False, data=payload)

The data sent:

POST /api/v2/uploads/upload/ HTTP/1.1
User-Agent: python-requests/2.32.5
Accept-Encoding: gzip, deflate, br, zstd
Accept: */*
Connection: keep-alive
Content-Length: 4725
Content-Type: multipart/form-data; boundary=51d3766f5769ab6091be732eb4851968
Authorization: Basic YWRtaW5AbG9jYWxob3N0OmFkbWlu
Host: vspar-dataviz-pp-geoserver-01.afp.com

--51d3766f5769ab6091be732eb4851968
Content-Disposition: form-data; name="action"

upload
--51d3766f5769ab6091be732eb4851968
Content-Disposition: form-data; name="skip_existing_layers"

true
--51d3766f5769ab6091be732eb4851968
Content-Disposition: form-data; name="base_file"; filename="20250405_050646_62_24d1.json"
Content-Type: application/octet-stream

The response:

HTTP/1.1 201 Created
Server: nginx/1.28.0
Date: Mon, 22 Jun 2026 15:43:01 GMT
Content-Type: application/json
Content-Length: 55
Connection: keep-alive
Vary: Accept, Authorization, Accept-Language, Cookie, origin
Allow: POST
Strict-Transport-Security: max-age=3600; includeSubDomains
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
Cross-Origin-Opener-Policy: same-origin
Content-Language: en-us
access-control-allow-origin: *
Set-Cookie: sessionid=t0k890w2nasgm95cq9de8uxy8q89sebu; expires=Mon, 06 Jul 2026 15:43:01 GMT; HttpOnly; Max-Age=1209600; Path=/; 
SameSite=Lax
Access-Control-Allow-Credentials: false
Access-Control-Allow-Headers: Content-Type, Accept, Authorization, Origin, User-Agent
Access-Control-Allow-Methods: GET, POST, PUT, PATCH, OPTIONS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions