Results 1 to 3 of 3

Thread: Multipart form upload - sending HtmlEditor content as a 'file'

  1. #1
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Sydney
    Posts
    117
    Answers
    3

    Default Answered: Multipart form upload - sending HtmlEditor content as a 'file'

    I have the need to send the content of a HtmlEditor field as a multipart form request, along with some other field parameters. Basically I'm trying to emulate a multipart form that, amongst other fields, contains a file field. Rather than having the user select a HTML file from their local machine, the content of the 'file' should come from a HtmlEditor component.

    Before I go and implement my own solution using a "new XMLHttpRequest()", does anyone have any suggestions as to how I could use functionality within ExtJS to simplify the process?

  2. Yes, that would be a good option if possible, however it isn't.

    I ended up implementing my own solution which was actually much easier than expected using the FormData object. Luckily we have the ability to dictate that a compatible browser is used.

    If anyone comes across this post and is looking for a good quick reference, please see the following link:
    https://developer.mozilla.org/en-US/...rmData_Objects

  3. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Perhaps you can just submit the form and then have the server script write the htmleditor content to a file.

  4. #3
    Sencha Premium Member
    Join Date
    Nov 2007
    Location
    Sydney
    Posts
    117
    Answers
    3

    Default

    Yes, that would be a good option if possible, however it isn't.

    I ended up implementing my own solution which was actually much easier than expected using the FormData object. Luckily we have the ability to dictate that a compatible browser is used.

    If anyone comes across this post and is looking for a good quick reference, please see the following link:
    https://developer.mozilla.org/en-US/...rmData_Objects

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •