Meteor-Files latestMeteor 1.6.1The files are uploaded properly, I can open them from the upload folder where they are uploaded without issue.
However using this code to download the file starts the download properly but the size of the downloaded file is similar "not equal" to the file in the upload folder (sometimes bigger). I can't open the file, office/adobe says the file is corrupted. Images are currupted too.
<a href="{{link}}?download=true" download="{{name}}" target="_parent">T茅l茅charger</a>
Hello @FrancisBou ,
We need more info:
.meteor/packages fileHi dr-dimitru,
Unfortunalety I can't get the download to show in the network tab, I've got no filter and "all" is selected, recording is on ,not sure why it's not there.
package file
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
accounts-base
accounts-password
useraccounts:bootstrap
accounts-ui
percolate:migrations
alanning:roles
kadira:flow-router
kadira:blaze-layout
session
arillo:flow-router-helpers
aldeed:template-extension
mdg:validated-method
mdg:validation-error
aldeed:simple-schema
aldeed:collection2
msavin:sjobs
http
percolate:paginated-subscription
ostrio:files
@FrancisBou , thank you for update.
curl -v "http://localhost:3000/link/to/the/file"ostrio:files to the line __above__ kadira:flow-router - This should solve the issueLet me know if it helped.
It seems that the link method returns an empty value, the downloaded file is in fact HTML, that's a bit embarassing! I saw you can use the "fileURL" helper and it works. Thanks so much @dr-dimitru
@FrancisBou link should work too. But it depends from how you iterate over the cursor.
Could you share your HTML+Blaze Template code?
I iterate using each:
{{#each communiques}}
<a class="list-group-item" href="{{link}}?download=true" download="{{name}}" target="_parent">
<i class="fa fa-file-pdf-o fa-fw"></i> {{ meta.nom }}
</a>
{{/each}}
Template.communiques.helpers({
communiques() {
return Communiques.find({});
}
});
To have access to all features you should iterate using .each property:
{{#each communiques.each}}
<a class="list-group-item" href="{{link}}?download=true" download="{{name}}" target="_parent">
<i class="fa fa-file-pdf-o fa-fw"></i> {{ meta.nom }}
</a>
{{/each}}
@dr-dimitru I should have read more carefully, thanks for the help!
Please, support this project by:
Most helpful comment
To have access to all features you should iterate using
.eachproperty: