Status 405 (Method Not Allowed)

4 posts, 1 answers
  1. Joy
    Joy avatar
    2 posts
    Member since:
    Sep 2016

    Posted 05 Sep 2017 Link to this post

    Editor / File and image browser ::

    When clicking on image icon from editor to upload new image in that case generate error as 405 method not allowed in HTML 5.

    I have attached here completed Zip file which content html. 

    Please provide me some solution for the same.

    Regards,

    Joy

  2. Answer
    Ivan Danchev
    Admin
    Ivan Danchev avatar
    1521 posts

    Posted 07 Sep 2017 Link to this post

    Hello Joy,

    The problem comes from the ImageBrowser not being able to make a successful request to the methods specified in its configuration:
    transport: {
        read: "/kendo-ui/service/ImageBrowser/Read",
        destroy: {
            url: "/kendo-ui/service/ImageBrowser/Destroy",
            type: "POST"
        },
        create: {
            url: "/kendo-ui/service/ImageBrowser/Create",
            type: "POST"
        },
        thumbnailUrl: "/kendo-ui/service/ImageBrowser/Thumbnail",
        uploadUrl: "/kendo-ui/service/ImageBrowser/Upload",
        imageUrl: "/kendo-ui/service/ImageBrowser/Image?path={0}"
    }

    while in the the file you attached the base url is:
    <base href="http://192.168.3.176:8080/">

    See this dojo example, in which the ImageBrowser works as expected. The base url points at our demos which use our demos service that provides the methods specified in the ImageBrowser's transport configuration. If you run the example locally however the origin of the request from http://localhost:... or http://192....  will be considered a cross-origin HTTP request and it will be blocked. You can avoid this by having your own service/back-end methods which will be accessed by the ImageBrowser without cross-origin requests, for example:
    transport: {
        read: "http://localhost:42471/ImageBrowser/Read",
        destroy: {
            url: "http://localhost:42471/ImageBrowser/Destroy",
            type: "POST"
        },
        create: {
            url: "http://localhost:42471/ImageBrowser/Create",
            type: "POST"
        },
        thumbnailUrl: "http://localhost:42471/ImageBrowser/Thumbnail",
        uploadUrl: "http://localhost:42471/ImageBrowser/Upload",
        imageUrl: "http://localhost:42471/ImageBrowser/Image?path={0}"
    }


    Regards,
    Ivan Danchev
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Joy
    Joy avatar
    2 posts
    Member since:
    Sep 2016

    Posted 11 Sep 2017 Link to this post

    Hello Ivan Danchev,

    Thanks for quick solution for problem. Currenctly I am not getting same error. However, I am getting below js error when ever browse image and upload image.

    Please refer below error :
    Uncaught ReferenceError: uid is not defined
        at Object.eval (eval at compile (kendo.all.min.js:25), <anonymous>:3:112)
        at d (jquery-1.12.3.min.js:2)
        at init.refresh (kendo.all.min.js:53)
        at init.d (jquery-1.12.3.min.js:2)
        at init.trigger (kendo.all.min.js:25)
        at init._process (kendo.all.min.js:28)
        at init.success (kendo.all.min.js:27)
        at success (kendo.all.min.js:27)
        at Object.n.success (kendo.all.min.js:27)
        at i (jquery-1.12.3.min.js:2)
     
     
    kendo.all.min.js:55 Uncaught TypeError: o[t].get is not a function
        at init._findFile (kendo.all.min.js:55)
        at init._createFile (kendo.all.min.js:55)
        at init._fileUpload (kendo.all.min.js:55)
        at init.d (jquery-1.12.3.min.js:2)
        at init.trigger (kendo.all.min.js:25)
        at x.performUpload (kendo.all.min.js:54)
        at M.fn.init.<anonymous> (kendo.all.min.js:54)
        at Function.each (jquery-1.12.3.min.js:2)
        at x.onSelect (kendo.all.min.js:54)
        at init._onInputChange (kendo.all.min.js:54)

    Thanks in advance. 

    Regards,
    Joy

  4. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1521 posts

    Posted 13 Sep 2017 Link to this post

    Hello Joy,

    Compared to the Editor from our File and image browser demo does your Editor have additional configuration? In the linked demo uploading images works as expected without throwing an exception. Are you able to replicate the error in a dojo example?

    Regards,
    Ivan Danchev
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top