In T405861#11285988, @Bawolff wrote:I think the next obvious question is can we make mw.title.new("Media:foo.svg"):getContent() return the text of the svg if the file is below a certain size. Then we could have lua do post processing on svg files, to e.g. change the colour of something.
More generally it would be kind of cool to allow lua access to (small) uploaded files. You could imagine allowing uploads of csv files as an alternative to jsonData.
In T405861#11286578, @SD0001 wrote:A more reasonable API might be as part of file metadata: mw.title.new("File:foo.svg").file.source, so that's it's recorded as a file usage. Or even better: mw.svg.newFromFile("foo.svg").