Custom Query (18300 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (133 - 135 of 18300)

Ticket Resolution Summary Owner Reporter
#184 fixed [patch] POST multipart is added to BrowserIO.js anonymous [email protected]
Description

API Additions

Two more arguments are added to the request:

  1. multipart is a Boolean value (true/false). Only POST can use it. Default is false.
  2. file is an object describing file or an array of objects describing files:
    • name is a simulated file field name (required). It is used by servers to handle your input.
    • content is a byte string, which represent the content of your file (required).
    • fileName is a name of your file (optional). Some servers may use it. If it is not present, name value is used.
    • contentType is a MIME type of your file (optional). Some servers may use it. If it is not present, application/octet-stream is used.

If file is present, multipart is automatically forced to true and method is forced to POST. Request's members postContent and contentType trump everything else like they did before.

multipart can be used for sending field values even if you don't need to transfer files. It has two benefits:

  • No value encoding is required during preparation step. It maybe useful in some cases.
  • Many servers have size restrictions for non-multipart POST to improve performance and prevent possible exploits. In this case switching to multipart can make transfers possible.

Examples

Sending some values using multipart POST

dojo.io.bind({
    url:        "http://site.my/processor/",
    content:    { item: "key", value: 12345 },
    method:     "POST",
    multipart:  true,
    load:       function(type, response, evt) { Save(response); },
    mimetype:   "text/plain"
});

Sending a file

dojo.io.bind({
    url:        "http://site.my/processor/",
    content:    { item: "key", value: 12345 },
    file:       { upload: "upload", content: "Hello!
World!
" },
    load:       function(type, response, evt) { Save(response); },
    mimetype:   "text/plain"
});

In this example method and multipart are not specified directly, because the mere presence of file implies:

    multipart: true,
    method:    "POST"

Upload two files

dojo.io.bind({
    url:        "http://site.my/uploader/",
    file:
    [
        { upload: "upload1", fileName: "hello.txt", 
            content: "Hello!
World!
" },
        { upload: "upload2", fileName: "test.js", 
            content: "test = Calculate();", 
            contentType: "application/javascript" }
    ],
    load:       function(type, response, evt) { Save(response); },
    mimetype:   "text/plain"
});

Notes

I tested this implementation with FF1.5 and IE6.

#185 fixed dojo.hostenv.writeIncludes doesn't seem to work for the dojo+ajax build alex [email protected]
Description

Greetings,

I'm trying to use the writeIncludes function as per the Q&A, but I'm not seeing any additional script elements show up in the head. I'm running on Firefox 1.0.7, Windows XP SP2 and using a personal build of the dojo+ajax profile. I think I'm running the nightly as of Nov 3 2005.

Thanks for any help

-b

#186 fixed found bug in dojo.dnd.HtmlDragManager, fix included anonymous [email protected]
Description

Bug: drop and drag code (which is great, btw, just started using dojo) does not correctly detect drop area when screen is scrolled. you can see it here by forcing a right scrollbar and hover-dragging between lists ... the Manager mistakes the moused-over child node by the screen offset: http://archive.dojotoolkit.org/dojo-2005-11-05/tests/dnd/test_simple.html

Fix: in HtmlDragManager?.js (in nightly build, http://archive.dojotoolkit.org/dojo-2005-11-05/src/dnd/), lines 205 and 206 need to change as follows:

currently: 205 var ttx = dojo.style.getAbsoluteX(tn); 206 var tty = dojo.style.getAbsoluteY(tn);

should be: 205 var ttx = dojo.style.getAbsoluteX(tn, true); 206 var tty = dojo.style.getAbsoluteY(tn, true);

second param is includeScroll, which the code is currently assuming to be false.

thanks for a great-looking project.

Note: See TracQuery for help on using queries.