Forceu / Gokapi

Lightweight selfhosted Firefox Send alternative without public upload. AWS S3 supported.
GNU Affero General Public License v3.0
1.71k stars 69 forks source link

Incorrect API Response for File Upload #183

Closed adripo closed 5 months ago

adripo commented 5 months ago

Description:

When uploading a file using the API, the response includes the following fields: Url, HotlinkUrl, and GenericHotlinkUrl. Each of these fields contains different generic values, but none of them include the file ID.

Expected Behavior:

The response should contain correct Url and HotlinkUrl with ID already present. GenericHotlinkUrl should not be provided

Actual Behavior:

The response provides:

  "Url": "https://domain/d?id=",
  "HotlinkUrl": "https://domain/hotlink/",
  "GenericHotlinkUrl": "https://domain/downloadFile?id="

All of these fields contain different generic values, but they do not include the file ID.

Screenshot:

image

adripo commented 5 months ago

There is also a FileInfo field tagged HotlinkId that always has an empty value. I don't think it is necessary

Forceu commented 5 months ago

This has been already changed in 6beabdebc325d9f14ab3df0f4d5d62f9c3d9a7b4, but is not released to the stable version yet. They are required for client-side JavaScript.

adripo commented 5 months ago

Thanks, do you have any forecast on the release date containing this change? I need to change my scripts contacting the API prior to that update.

Forceu commented 5 months ago

Most likely in 1-2 weeks. If you are using Docker, you can already use the image latest-dev, it should be stable enough for daily use.