Board Thread:Support Requests - Getting Technical/@comment-30724837-20161231162133/@comment-9605025-20170102011511

I am not entirely sure what you mean. Can the template upload the files for you at the same time you add the infobox? No, as far as I am aware. If you are adding the file itself (not a link to it) to a page, the editor allows you to upload the file "on the spot". However, this would be done through the editor, separate from any template. The only other option is to upload the files separately from both the template and editing the page.

Your question sparked my personal interest so I have been digging around as much as I can with my limited knowledge of how MediaWiki works. Unfortunately, it seems that you would need to put in a special request in order to be able to upload csv, xml, and xls files. As far as I can tell, the only formats you can upload to a wiki are, by default, limited to whatever files are on the pre-approved video sites (through Special:WikiaVideoAdd) and the formats approved for "images" (through Special:Upload and Special:MultipleUpload).

I also tried looking at how the file placeholders work. However, I was only able to examine the image placeholder (there used to be a video placeholder). Furthermore, the script used for that has the same restrictions as the upload pages mentioned above.

One alternative is to upload the other files to some other website like Google Docs. Then you can have the infobox provide links to the files. The uploading process would then be dictated by the external website.

As for the ods and png formats, these are already supported by the upload pages listed above. If you want to upload them simultaneously, you must do so at Special:MultipleUpload. This can be done either before or after you use the template. If you are okay uploading them separately, you can use Special:Upload. Again, this can be done either before or after you use the template. Note that, in either case, uploading the files after you use the template may require you to clear the cache for the article page. This can be done by appending "?action=purge" to the base URL of the article page and then going to that modified URL.

If you want the template to provide links to upload the ods and png files while they are missing from the wiki, there are two options. First, you can use placeholders. However, these are meant for when the files will be displayed on the page. Therefore, I don't think this is a good idea for you. The alternative is to provide links to Special:Upload. For example, "Template:Example/ODS Data" could work as follows:

Note that you would then need to go back to the template and enter the filename once it has been uploaded. Perhaps more advanced contributors know some other workaround.