jurteam / platform

Jur Beta Platform
https://beta.jur.io
0 stars 0 forks source link

FIX File content APIs throw 404 #304

Closed tyagishuchi1 closed 4 years ago

tyagishuchi1 commented 4 years ago

When accessing a file uploaded as a Resolution Proof, it gives 404 error. The spinner keeps spinning without showing an error message image

Expected Behavior

  1. Should be able to fetch the document.
  2. In case of error, it should display proper information to user.

Steps to Reproduce

Environment: Temp

  1. Create a contract
  2. Upload a document as Resolution Proof
  3. Try to access that document on the contract page
mtmsuhail commented 4 years ago

@ashishjur The link seems front-end GET request, could you please provide what API causing this error?

ashishjur commented 4 years ago

It is making a POST request http://167.71.2.142/api/v1/contracts/dVGeg2?include=attachments

Screenshot from 2020-07-24 14-37-49 Screenshot from 2020-07-24 14-37-32

ashishjur commented 4 years ago

About reading the file: There was a symlink issue. As part of the setup, a symlink should exist from a publicly accessible folder to the file storage folder.

About uploading the file: It was the log file owner issue. This is also part of the setup process.

# inside docker
cd public && ln -s ../storage/app/public
chown -R www-data:www-data storage/logs