mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #22533 from overleaf/ar-only-use-history-for-blobs-when-enabled
[web] only use history for blobs when enabled GitOrigin-RevId: 010983e9b29657d4c594e03945dca5700577bf0a
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
// Helper function to compute the url for a file in history-v1 or filestore.
|
||||
// This will be obsolete when the migration to history-v1 is complete.
|
||||
|
||||
import getMeta from '@/utils/meta'
|
||||
|
||||
const projectHistoryBlobsEnabled = getMeta('ol-projectHistoryBlobsEnabled')
|
||||
|
||||
export function fileUrl(projectId, id, hash) {
|
||||
if (hash) {
|
||||
if (projectHistoryBlobsEnabled && hash) {
|
||||
return `/project/${projectId}/blob/${hash}?fallback=${id}`
|
||||
} else {
|
||||
return `/project/${projectId}/file/${id}`
|
||||
|
||||
Reference in New Issue
Block a user