You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@brucejo75 if you are planning on expanding this sample app, here is an issue that's probably worth including. (I myself just ran into this)
meteor-file-collection is able to setup a way to download files via 'http'. The problem is that if you are using Flow Router in your application, the Flow Router will blatantly disregard anything that's not specified as a route of Flow Router. So, when you click on an image or file to download - it will throw a (client-side) 404. To get around this issue, you need to specify target='_self' or download='filename'as an attribute on the URL (alongside the href attribute) and then Flow Router will leave you alone.
Here is the actual back and forth from the Flow Router guys
I added the target attribute in the sample. Although, the sample does not seem to have this issue.
I was having the issue on my application too, I figured I would investigate later. You probably saved me an hour or 2 tracking it down. thanks!
Also as part of my checkin I added an extension to file-collection findOneFile which is a synchronous read of the file. Super useful for me. Maybe you will find it useful too.
Also, now that I looked around a little more, download='filename' (as an attribute inside the a element) is probably a better option than using target='_self'because it serves as a suggestion for what the filename should be based on the value inside the download attribute
@brucejo75 if you are planning on expanding this sample app, here is an issue that's probably worth including. (I myself just ran into this)
meteor-file-collection is able to setup a way to download files via 'http'. The problem is that if you are using Flow Router in your application, the Flow Router will blatantly disregard anything that's not specified as a route of Flow Router. So, when you click on an image or file to download - it will throw a (client-side) 404. To get around this issue, you need to specify
target='_self'
ordownload='filename'
as an attribute on the URL (alongside thehref
attribute) and then Flow Router will leave you alone.Here is the actual back and forth from the Flow Router guys
kadirahq/flow-router#235
Hoping this is useful to whoever runs into this issue :)
The text was updated successfully, but these errors were encountered: