• Resolved Chuck

    (@cfwilson)


    Hello, just ran into an issue where uploading a svg, the contents of the file get formatted. This proved to be problematic when using file_get_contents. Any way to prevent this formatting from occurring?

    Thanks,
    Chuck

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Daryll Doyle

    (@enshrined)

    Hi Chuck,

    What sort of formatting do you mean? As in the plugin is adding whitespace to the SVG?

    Cheers,
    Daryll

    Thread Starter Chuck

    (@cfwilson)

    Hello Daryll, that is correct. Before uploading I remove all whitespace from the svg, if I grab the svg off the server after uploading it, it appears to have been formatted/whitespace added, and prevents the use of file_get_contents. After manually removing all whitespace again, file_get_contents works again.

    Thanks,
    Chuck

    Plugin Contributor Daryll Doyle

    (@enshrined)

    Thanks Chuck,

    I’ll take a look at this tonight and push up a fix for it then update here when that’s done ??

    Thanks for the report!

    Cheers,
    Daryll

    Plugin Contributor Daryll Doyle

    (@enshrined)

    Hi Chuck,

    The plugin has been updated now. If you can give 1.3.0 a try and let me know how you get on with that one. If it works I’ll mark this as resolved ??

    Cheers,
    Daryll

    Thread Starter Chuck

    (@cfwilson)

    Hi Daryll, thanks for the update, it appears to have fixed the issue.

    Thanks,
    Chuck

    Plugin Contributor Daryll Doyle

    (@enshrined)

    Great to hear! Thanks Chuck

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Formatting of file contents on upload’ is closed to new replies.