File Attachment URL Issues
-
We are having an issue with downloading file attachments that are attached to comments on tasks. When a user goes to the “My Tasks” area and opens a task, they cannot download files. Instead they see the following in their browser:
{"code":"rest_no_route","message":"No route was found matching the URL and request method.","data":{"status":404}}Steps to reproduce:
– Create a project and task.
– Assign the task to another user.
– Add a comment to the discussion area of the task and attach a file.
– Login as the other user and go to Project Manager –> My Tasks.
– Click on the task name to open the task.
– Click on the file attachment.If the user instead goes to “Projects” and opens the task there, they can download the file attachment there with no issues. It looks like the issue is due to the download URL.
If you try to download a file from the “My Tasks” area, it has “NaN” in the URL instead of the project ID. Here is an example:
https://****.com/wp-json/pm/v2/projects/NaN/files/77/users/2/downloadIf you try to download a file from the “Projects” area, it works and the URL looks like below:
https://****.com/wp-json/pm/v2/projects/5/files/40/users/2/download
The topic ‘File Attachment URL Issues’ is closed to new replies.