chore: update returned attachement fullPath (#9516)
### Solution fullPath prop on attachement (when returned by backend) is updated to 'domain + path' (formerly 'path'). Consequently, getFileAbsoluteURI util in front is removed. closes #8763 --------- Co-authored-by: etiennejouan <jouan.etienne@gmail.com>
This commit is contained in:
@ -1,10 +0,0 @@
|
||||
import { getFileAbsoluteURI } from '../getFileAbsoluteURI';
|
||||
import { REACT_APP_SERVER_BASE_URL } from '~/config';
|
||||
|
||||
describe('getFileAbsoluteURI', () => {
|
||||
test('should return absolute uri', () => {
|
||||
expect(getFileAbsoluteURI('foo')).toEqual(
|
||||
`${REACT_APP_SERVER_BASE_URL}/files/foo`,
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -1,5 +0,0 @@
|
||||
import { REACT_APP_SERVER_BASE_URL } from '~/config';
|
||||
|
||||
export const getFileAbsoluteURI = (fileUrl?: string) => {
|
||||
return `${REACT_APP_SERVER_BASE_URL}/files/${fileUrl}`;
|
||||
};
|
||||
Reference in New Issue
Block a user