# Module upload to library error: APIError 400: Bad Request

**URL:** <https://forum.vassalengine.org/t/module-upload-to-library-error-apierror-400-bad-request/90206>\
**Category:** Technical Support & Bugs\
**Created:** [June 13, 2026, 6:29am UTC](https://forum.vassalengine.org/t/module-upload-to-library-error-apierror-400-bad-request/90206 "2026-06-13T06:29:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![clanmacrae](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@clanmacrae](https://forum.vassalengine.org/u/clanmacrae)\
**Post date:** [June 13, 2026, 6:29am UTC](https://forum.vassalengine.org/t/module-upload-to-library-error-apierror-400-bad-request/90206/1 "2026-06-13T06:29:39Z")

</div>

Tried several times to upload my Prussia’s Glory II Module around 01:20 13 June. Keep getting the APIError 400: Bad Request.

I logged out and back in a few times. Tried uploading from both Edge and Firefox.

![image](https://forum.vassalengine.org/uploads/default/original/2X/0/02a6dc250a37c3fcf35b872df0b4469d27f04ced.png)

 ![image](https://forum.vassalengine.org/uploads/default/original/2X/f/f6efa6e36244d062a274dab51c38e24700a350e3.png)

---

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [June 13, 2026, 10:19am UTC](https://forum.vassalengine.org/t/module-upload-to-library-error-apierror-400-bad-request/90206/2 "2026-06-13T10:19:10Z")

</div>

How far did the upload progress? Did you get an error immediately?

Where can I get a copy of the module so I can examine it?

---

<div class="post-metadata">

**Author:** ![clanmacrae](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@clanmacrae](https://forum.vassalengine.org/u/clanmacrae)\
**Post date:** [June 13, 2026, 4:05pm UTC](https://forum.vassalengine.org/t/module-upload-to-library-error-apierror-400-bad-request/90206/3 "2026-06-13T16:05:07Z")

</div>

Immediately.

You can look at it [here.](https://we.tl/t-X8FPWTXfy0byG5Ek)

Thanks.

---

<div class="post-metadata">

**Author:** ![clanmacrae](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/c/e8c25b/32.png) [@clanmacrae](https://forum.vassalengine.org/u/clanmacrae)\
**Post date:** [June 13, 2026, 6:44pm UTC](https://forum.vassalengine.org/t/module-upload-to-library-error-apierror-400-bad-request/90206/4 "2026-06-13T18:44:03Z")

</div>

Solved it while watching baseball!

It was the apostrophe.

![image](https://forum.vassalengine.org/uploads/default/original/2X/3/3d208ddb2b0edfbdf45bf3cfe55bc309ce60282f.png)

Thanks for the response, though.

---

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [June 13, 2026, 9:51pm UTC](https://forum.vassalengine.org/t/module-upload-to-library-error-apierror-400-bad-request/90206/5 "2026-06-13T21:51:56Z")

</div>

I suspected the apostrophe was the problem, but hadn’t gotten as far as proving it.

As much as I dislike apostrophes in filenames, it ought to work and I’m going to run down why it doesn’t.

---

<div class="post-metadata">

**Author:** ![cholmcc](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cholmcc/32/8319_2.png) [@cholmcc](https://forum.vassalengine.org/u/cholmcc)\
**Post date:** [June 14, 2026, 6:19am UTC](https://forum.vassalengine.org/t/module-upload-to-library-error-apierror-400-bad-request/90206/6 "2026-06-14T06:19:47Z")

</div>

> [@uckelman](#):
>
> As much as I dislike apostrophes in filenames, it ought to work and I’m going to run down why it doesn’t.

It is likely not a normal `'` but some other glyph. MacOS has a tendency to replace ASCII characters with glyphs 🫥

Yours,  
_Christian_

---

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [June 15, 2026, 10:42pm UTC](https://forum.vassalengine.org/t/module-upload-to-library-error-apierror-400-bad-request/90206/7 "2026-06-15T22:42:14Z")

</div>

Note that we already had an issue in the tracker for this. [Frontend should reject bad filenames · Issue #55 · vassalengine/game-library · GitHub](https://github.com/vassalengine/game-library/issues/55)

---

<div class="post-metadata">

**Author:** ![uckelman](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/uckelman/32/10020_2.png) [@uckelman](https://forum.vassalengine.org/u/uckelman)\
**Post date:** [June 18, 2026, 8:06pm UTC](https://forum.vassalengine.org/t/module-upload-to-library-error-apierror-400-bad-request/90206/8 "2026-06-18T20:06:13Z")

</div>

I’ve completed [GL #55](https://github.com/vassalengine/game-library/issues/55). The library frontend will now tell you if you have an invalid filename.

Valid filenames are:

- nonempty
- less than 256 characters long
- have no leading or trailing whitespace
- do not end with `.`
- do not contain `..`
- do not contain control characters or any of `"'*/:<>?|\`
- not Windows reserved filenames (`CON`, `PRN`, `AUX`, `NUL`, `COM1`, …, `COM9`, `LPT1`, …, `LPT9`)
