Skip to content
This repository was archived by the owner on Jul 14, 2022. It is now read-only.
This repository was archived by the owner on Jul 14, 2022. It is now read-only.

Set Content-Type to application/json in response #7

Closed

Description

@aaronchi

I noticed that the plugin doesn't work if you actually return a json response. It seems to only work if you send a text/html response with json in it. I assume this is due to the way that the response is being parsed in the javascript.

Great start on a simple upload plugin though. Would be great to extend it and include a list view as well with a configurable endpoint for pulling in the image details.

Thanks!

Activity

  1. PerfectlyNormal commented on Apr 21, 2012

    @PerfectlyNormal
    Owner

    Yeah, I know it has a few warts. Found some code that did the job, packaged it and played around 'til I got it working "good enough" for my needs. Planning on making it a bit nicer as time permits.

    I see I forgot to mention the content_type bit. Wrote a short line in the readme, and I'll see if I can't get that fixed as well. Thanks for letting me know.

  2. PerfectlyNormal commented on Apr 23, 2012

    @PerfectlyNormal
    Owner

    Gave this a little try today, and got it working in Safari, Chrome and the likes when using application/json or text/javascript or pretty much any encoding. Only problem was IE, who attempts to download it the second something other than text/html gets sent.

    So from what I can see while researching, as long as we use a iframe for the uploading (which needs to be done to support IE and Opera), the content-type needs to be text/html or text/plain

  3. Darkside73 commented on Jun 2, 2014

    @Darkside73

    Can you publish your efforts as a branch? I'm don't care about IE and Opera

  4. PerfectlyNormal commented on Jun 3, 2014

    @PerfectlyNormal
    Owner

    Hi.

    I'm terribly sorry, but looks like I don't have that any more. I've moved machines since I played around with that, and that little experiment disappeared.

    Don't really remember how I did it either. Sorry about that.

  5. Looooong commented on Sep 18, 2017

    @Looooong

    can we append format to the link? Like /tinymce_assets.json

  6. PerfectlyNormal commented on Oct 29, 2017

    @PerfectlyNormal
    Owner

    @Looooong might be possible to do and get a sensible response. Have you tried it?

    The url the plugin uses can be customized. I don’t remember the exact parameter name, but it’s listed in the readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions