Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration with fof/pages: File rendering & download should work outside of original post #331

Open
JeromeGillard opened this issue Oct 12, 2022 · 0 comments
Labels

Comments

@JeromeGillard
Copy link

Bug Report

Current Behavior
Uploaded files are not rendered in fof/pages.
Uploaded files cannot be downloaded fof/pages.

Steps to Reproduce

  • create a post, let's say it has route /d/1-test
  • upload a file and insert it as bbcode in the post: [upl-file uuid=e737f663-f38f-4d93-9d1c-5ec7abd4b19c size=2kB url=https://www.test.com/assets/files/2022-10-12/1665582177-619189-tes.gpx]test.gpx[/upl-file]
  • create a fof/page , let's say it has route /p/2-new-page
  • paste the same bbcode in the page
  • error: the file cannot be displayed nor downloaded

Expected Behavior
The bbcode [upl-file uuid=e737f663-f38f-4d93-9d1c-5ec7abd4b19c size=2kB url=https://www.test.com/assets/files/2022-10-12/1665582177-619189-tes.gpx]test.gpx[/upl-file] should be working on pages.

Environment

  • Flarum version: 1.3.0
  • Extension version: 1.2.3

Possible solution(s)

A workaround is to create a post that has the same post.id than the page route's. Then it works.
But the page existence is now tied to another public post.

Additional Context

  • ideally, a file should not depend on a post's existence
  • having a uuid in the bbcode should make size & url redundant.
  • having url in the bbcode is a big problem for domain name portability
  • Having the rendering to fetch the file to yet another URL like /api/fof/download/e737f663-f38f-4d93-9d1c-5ec7abd4b19c/2-new-page/2A2AZKCJO8dHR907FnyRBQBf2by07jKUzNVFrxo0 is odd. Why include the current route instead of the original one?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant