gioppoluca / sheet-export

Module to export foundry generic Document sheet
GNU Affero General Public License v3.0
4 stars 5 forks source link

Error exporting when hosting on The Forge #24

Open lordmogra opened 4 months ago

lordmogra commented 4 months ago

Describe the bug There is a 404 error trying to fetch the avatar image when exporting from a game hosted on The Forge.

To Reproduce Steps to reproduce the behavior:

  1. Be hosted on The Forge
  2. Open Character Sheet
  3. Export To PDF
  4. Apply

Expected behavior Should ignore error.

Additional context This appears to happen because the Avatar image is an absolute URL to Forge's Assets page and is being appended to the Forge game's URL. The image that is being attempted to grab is {ForgeGameURL}{AvatarPath}, when in this situation it only needs to be the AvatarPath.

I have a feeling this is being cased by getRoute, but could not find how to tell getRoute to not do this or I would have provided a fix myself (I'll still look into this, but getting more eyes will help I think).

lordmogra commented 4 months ago

I imagine this would also happen on a local install if the image is set as any full URL to an externally hosted source.