HTTPService: POST + byte-stream data?

Hi everyone,.

I am stuck for quite some time on a problem, look here and there on the forums after a solution but still fragmentary.

If you allow me, I would like to expose to you people:

My Flex (3.5 sdk) project to record a sound and then must send it to a web page. The equivalent in terms of form must be exactly as:

" < form method ="post"action ="http://www.myDomain.be/myFile.php"enctype =" multipart/form-data"> "

           < table >                                                              

data < tr > < td >: < table > < td > < input type = "file" name = "data" / > < table > < /tr >

audioSamplingRate < tr > < td >: < table > < td > < input type = "text" name = "audioSamplingRate" value = "22050" / > < table > < /tr >

audioBigEndian < tr > < td >: < table > < td > < input type = "text" name = "audioBigEndian" value = "false" / > < table > < /tr >

< /table >

< input type = "submit" / >

< / make >

I try to find the exact equivalent in flex using HTTPService and URLLoader, etc... But I can't seem to do this simple thing: send my byteArray (as one. RAW file) to the page web with classic post datas as would send the form above.

FWI, I managed to send the byteArray with a content type ' application/octet-stream', but don't not to send data of PUBLICATION regular at the same time (GET work, but should not be used).

I would be infinitely grateful is someone could put me on the right path for the answer

PS: Sorry for my English, French is my mother tongue.

These classes are for Amazon S3 (Simple Storage Service).

Here is an example I found using as3httpclient for a multipart POST.

Update: and here is an updated link that mentions this article.

Tags: Flex

Similar Questions

  • Error of TCP connection when sending MODBUS for WAGO controller 750-881 orders after 113655 bytes of data have been sent

    Hi all

    I'm new in the world of labview and trying to build a VI that sends commands to a controller of the WAGO 750-881 at regular intervals of 10 ms.

    To set each of the WAGO comics at the same time, I try so to send the Modbus fc15 command every 10ms using Labview standard TCP write module.

    When I run the VI it works for about a minute before receiving an error message 56 telling me the TCP connection has expired. This strange thought, I decided to record the number of bytes sent via the TCP connection while running the program. In doing so, I noticed that the link broken after exactly 113655 bytes of data have been sent each time.

    Thinking can I have sent too many messages, I increased the delay of the loop of 10ms to 20, 100 and 200 ms, but the error remained. I also tried to play with the TCP connection timeout and the writing TCP timeout, but none of these had no effect on the problem.

    I do not see why this error occurs, such as the program works perfectly up until what brand 113655 bytes.

    I've attached a screenshot of the base VI (simply showing a MODBUS command sent every second) and a more advanced VI (where I am able to control each of the WAGO manually by setting a frequency at which the DO is to switch between ON and OFF).

    If anyone has any ideas on where the problems lie, or that I could do to debug more program this would be greatly appreciated.

    AvdLinden wrote:

    Hi ThiCop,

    Yes, the error occurs after exactly 113655 bytes each time. Time-out control, I would like to use is 10ms, but even that will rise to 1 s or 10s does not error, which leads me to believe that's not the issue (as well, do not add any delay in the while loop, so let it run at the maximum speed showed that the TCP connection is able to send all the bytes 113655 in less than 3 seconds again directed towards control of time-out) is is not the issue here).

    I tried the suggestion of Marco but having difficulty to translate the string returned in a readable string (rightnow the answer given is "-# +" ' ").

    As for your second suggestion, I've implemented something similar, where I created a sub VI to establish a TCP connection, send a message and then close the connection. I have now to build each message and then send the string to the Subvi, which sends the command to my application successfully. While not the most elegant method to solve the problem, it solves the problem of time-out, which means that I am able to send as many orders as I want. So in this sense, the problem has been resolved.

    If you have advice on how to properly read the TCP read the output, I want however to see if I could not get my first program to work because it is slightly more robust in terms of timing.

    MODBUS RTU TCP is a binary protocol, as you show in your base VI, where you put in the form the data stream using byte values. So you have to interpret the returned answer accordingly with the Modbus RTU spec in the hand. Now what is probably happening is that the connection is suspended after a while because you do NOT read data from the device sends as response to your commands. The TCP/IP stack cushions these bytes and at certain point of overflow internal buffers and the connection is blocked by the battery. So to add playback of TCP in strategic locations (usually after each entry) is the right solution for this. Is there a reason any that you do not use the PROVIDED Modbus TCP library?

  • Form of bytes of data storage...

    Hello

    How to keep the form of bytes of data on card SD BlackBerrry... And how to upload this form bytes of data from the server... Kindly help...

    Can you googled around to find out how the connectiona nd http to read the file, etc... requirements of a second, you have the code in the previous post.

  • How to send frames to header + 1 byte of data in network LIN?

    Hello

    I use USB-8476 to communicate to a slave in a LIN network. Can someone tell me how I can send a header file more 1 byte of data to the slave in a LIN network.

    I need to send a sync + id 00 X 34 break, followed by a byte of data. I don't know how a master can send this extra 1 byte of data. I need to send this command to the LED and byte 1 to control the level of illumination of the LED lights.

    If anyone has examples for this, can share you here?

    Thank you

    Hi Andreas,

    This error has not yet been documented, but I got the information on the other forums.

    Error name error Code (hex) description

    Task-master of 1040 LinBusErrorTxSyncTimeout LIN interface is trying to send a

    synchronize the bytes and not not not receive the sync byte

    during the period.

    This is the description. The problem is solved, the baud rate I gave was higher than the speed of the slave units. Now, it seems to work correctly.

    Thank you.

  • Player Windows Media won't play byte streams as files are damaged or corrupted

    which is a byte stream because my media player won't play it say files are damaged or corrupt

    Hi AntonyNorcup,

    (1) since when are you facing this problem?

    (2) what is the complete error message you receive?

    (3) when exactly you get this error message?

    (4) what Version of Windows Media Player do you use?

    Method 1: Users have solved a similar problem by Windows Media Player library database,

    You cannot view, add, or delete items in the library of Windows Media Player 11

    http://support.Microsoft.com/kb/925718

    Method 2:  You can also see the steps outlined in the article below

    Error message when you try to use Windows Media Player to stream audio or video from Windows Media Services: «the specified protocol is not supported»

    http://support.Microsoft.com/kb/940029/en-us

  • I have a trigger to post to the data block request...

    I have a trigger to post to the data block request...
    BEGIN
         IF :SECTION IS NOT NULL THEN
              SELECT DESCRIPTION INTO :BOROUGH FROM C_LOV_BOROUGH WHERE :SECTION = SECTION;
         END IF;
    END;
    Table C_LOV_BOROUGH has many lines

    When I scroll quickly after querying data...
    I get the error ORA-01403, after than scrolling up and down... it disappears... someone can help?

    Use a slider instead of direct SQL SELECT as if you can't find all the lines, would not raise an exception, or use an exception handler to handle all exceptions silk-screened - found.

    DECLARE
     CURSOR c_get_desc IS
       SELECT DESCRIPTION
         FROM C_LOV_BOROUGH
       WHERE SECTION = :SECTION;
    BEGIN
    IF :SECTION IS NOT NULL THEN
      OPEN c_get_desc;
      FETCH c_get_desc INTO :BOROUGH;
      CLOSE c_get_desc;
    END IF;
    END;
    

    Second method:

    BEGIN
      IF :SECTION IS NOT NULL THEN
        SELECT DESCRIPTION INTO :BOROUGH
          FROM C_LOV_BOROUGH
       WHERE SECTION = :SECTION;
      END IF;
    EXCEPTION
      WHEN NO_DATA_FOUND THEN NULL;
    END;
    

    Cursor is safer than direct SELECT SELECT because maybe meet TOO_MANY_ROWS exceptions too... but if you use the slider, he realized the first found line extraction and populate the BOROUGH and if it does not find anything, it won't throw an exception.

  • How to effectively change decimal numbers hexadecimal bytes streaming?

    Technical support,

    There is an instrument connected to a serial port on my computer which is streaming 25 bytes of hexadecimal data every second.  After changing the display for "Display Hex" mode, I can now see the hexadecimal bytes instead of Laura.  I use the "Hexadecimal string to number" vi with marginal success.  I mean, that (1) I can't convert the entire hex string at all, and (2) when you use "String subset" to analyze different hexadecimal bytes I'm able periodically to convert a hexadecimal byte to a whole number.  I tried the suggestion of molded type indicated in a previous post on this subject without change of achievement, although I do not quite understand how it works (how to set correctly the type?).  Do I need a buffer to convert continuous hexagonal data streaming?

    I would send my vi, but it is quite simple.  25 bytes of hex data in every second (1 second buffer), Index 0, default U32, sent to an indicator.  At this point, all I want to do is see my data.  I'm using LabView 8.5.1.  Please indicate if I should provide more information.  Thank you.

    ~ Going bananas

    CodeMunkee wrote:

    After changing the display for "Display Hex" mode, I can now see the hexadecimal bytes instead of Laura.  I use the "Hexadecimal string to number" vi with marginal success.  I mean, that (1) I can't convert the entire hex string at all, and (2) when you use "String subset" to analyze different hexadecimal bytes I'm able periodically to convert a hexadecimal byte to a whole number.  I tried the suggestion of molded type indicated in a previous post on this subject without change of achievement, although I do not quite understand how it works (how to set correctly the type?).  Do I need a buffer to convert continuous hexagonal data streaming?

    I would send my vi, but it is quite simple.  25 bytes of hex data in every second (1 second buffer), Index 0, default U32, sent to an indicator.  At this point, all I want to do is see my data.  I'm using LabView 8.5.1.  Please indicate if I should provide more information.  Thank you.

    If your data looks correct when you set the display string for hex, the 'hexadecimal string to the number"is NOT the right tool (it hexadecimal sat in the format of strings containing ASCII characters 0...) F only). You have a binary string so labeled is the right tool. If you want the first 4 bytes as U32, simply create you a diagram representation U32 constant (the value is irrelevant) and connect to the entrance of type type conversion. The output will be a single wire digital U32 containing the desired output.

    What is in the rest of the string? It cannot be U32 except if there are a few characters to terminate employment. Want to see one of the remaining data? In this case, you will need to tell us the structure.

    So please create a flag for the string of your own, run the VI it contains data, then convert the flag to a constant of diagram (right click on Terminal... change to constant: this way to see what you actually). Now, save the VI and attach it here. Tell us what value you expect. (Things could be a little more complicated if you have BOM with the little rule).

    I have a don't know what you mean by "continuous" data. How much history you want to keep? You want to stream to disk? If you just want to see recent history data, connect to an array whose length desired history.

  • Array of bytes Streaming playback

    Hello:

    Could someone french me some light, how could I impliment line three of the code in Labview?

    I have a pulse oximetry sensor conncected to Labview via a serial port VISA. Communication is very good, and I read 5 bytes successfully.

    However, each cycle, the context of the 3rd byte changes. Question is how can I build an array in the while loop (main), passing the value of octet 3 in another table.

    Byte0 | Octet1 | Octet2 | Byte 3 |  Byte4

    Number of sample to 1 / 1 255 255 100 255

    Number of sample2 1 255 255 255 50

    Number of Sample3 1 255 255 255 98

    The sensor will send 25 5bytes package, three times per second.

    The Streaming variable may represent 1 d table consists of 25 byte values #3.

    Then the rest of the algorithm would go on this Board on spidific, print the third value.

    For (i = 0; i<=25;>

    {

    InByte [i] = value ;} Streaming

    Serial.Print ("inByte [# favorite bytes print]" "");

    Could anyone recommend an appropriate approach rather tables? or it's the right path to take?

    I have attached the data of the page7 TCHF probe data sheet hanging in detail.

    Any help would be appreciated.

    KALOU

    Here is a similar example to what recommended Dennis.

    Lynn

  • How the TDS3000 stream data?

    Hello

    I want to stream from my application in Labview for later analysis.

    Material: Tektronix TDS3014C

    Software: Labview SignalExpress 2.5.1 + Extensions of Tektronix

    I don't know exactly when the interesting transitional signal appears, so I would save about 5-10 seconds of data stream.

    For now, I'm getting a few fractions of 2 scope and we standby trigger.

    Is it possible to disable the trigger or a key word, I might look for?

    Thanks for your help,

    Nook

    AJMAL,

    I think you've got this confused with another post.

    nook,

    You can listen rarely continuous data from GPIB scope. You can check the manual but often the scope can not pass as it acquires so you have a sequential operation wait, trigger, acquire, transfer, repeat.

    You cannot set the transitory relaxation?

  • HTTPService.send sends no data anny

    Hi all

    I have a serious problem when my application is online, I can't send data to anny with the HTTPService.send command. but when he does it on the spot.

    When I click on the button tho send any data, it is not still try to connect here is my code and I can't find the problem. I hope someone can point me in the right direction

    Here is my code:

    <? XML version = "1.0" encoding = "utf-8"? >
    < s:Application
    ' xmlns:fx = ' http://ns.Adobe.com/MXML/2009 "
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/halo".
    minWidth = minHeight = "700" "715" width = "700" height = "715".
    xmlns:upload = "" services.upload. * ""
    creationComplete = "initVars () '"
    >

    protected function btn_publish_clickHandler(event:MouseEvent):void
    {

    var idioot:int = 1;
    var text_veld:String = new String();
    text_veld = tekst_stuk.text


    obj. User = idioot;
    obj. Titel = titel.text;
    obj. Keywords = zoek_data.text;
    obj. Text = tekst_stuk.text;
    If (voor_geld.text! = null)
    {
    obj.price_off = voor_geld.text + '. ' + voor_geld_cent.text;
    }
    ElseIf (korting_input.text! = null)
    {
    obj.price_off = korting_input.text;
    }

    If (korting_radio. Selected is true)
    {
    obj. Price = geld.text + "." + geld_cent.text;
    obj.price_type = "p";
    }
    Another yew (gratis_radio.selected is true)
    {
    obj. Price = '0 '.
    obj.price_type = "g";
    }
    Another yew (van_voor_radio.selected is true)
    {
    obj. Price = geld.text + "." + geld_cent.text;
    obj.price_type = "m";
    }
    obj. Img.source = IMG_1;
    obj. IMG_2 = img_2.source;
    obj.img_3 = img_3.source;
    obj. IMG_4 = img_4.source;

    }
    private void send_data_event(e:Event):void
    {

    send_data. Send (obj);
    send_data.showBusyCursor;
    }

    < fx:Declarations >
    " < mx:HTTPService id ="send_data' method = 'POST' url = ' http://someURL "resultFormat ="text"useProxy ="false"/ > "
    < / fx:Declarations >

    < mx:Image = "525" x = "559" source = "buttonpubliceren.png" width = "150" height = "30" id = "btn_publish" click ="btn_publish_clickHandler (event); "/ >

    try to trace all of the properties of objects.

  • HTTPService POST

    Hi all, HTTPService and the POST method is confusing me a little, try to post a few values to a Web server, when I use GET, its no problem, when using POST nothing is received at the server level, and I can't get that data values is validated with firefox and firebug.

    Snipplet:
    private void start (): void
    {
    service = new HTTPService();
    service. URL = "" http://webserver.com "; "
    service. Method = "POST";
    service.resultFormat = "object";

    var params: Object = new Object();
    params.Ping = "pong."
    service. Send (params);
    }

    Couldn't find a good explanation on this issue, I'm doing something wrong?

    Thanx.

    Hello

    I tried this and its work. I noticed one thing, it is that for the first time I sent the request, the request timed out. But for the second time, I got the results. Maybe you can try to increase the time for the requestTimeout property.
    I hope this helps.

    The code I used:
    private function sendData (): void
    {
    var service: HTTPService = new HTTPService();
    service. URL = "" http://flexlab.dnsalias.com/GetPost.aspx "; "
    service. Method = "POST";
    service.addEventListener (ResultEvent.RESULT, resultHandler);
    service.resultFormat = 'text ';
    service.requestTimeout = 10;
    service. Send (Object({ping:"pong"}));)
    }

    private void resultHandler(event:ResultEvent):void
    {
    Alert.Show (Event.Result.ToString ());
    }

    Response, I got from the server:

  • Double post of form data in Eloqua and SFDC

    Our SFDC admin wants to move to display all form both Eloqua and SFDC data, and to make the list of all imports in SFDC. His team has already found the 3rd party systems to counter problems of duplication in SFDC de-duplication. As Eloqua user, I find the process of taking a step backwards in our marketing automation process. Any of you have experience with dual signage? Reasons for or against it?

    Although it is possible with a re-post form I would advise against. I had similar discussions where people are not familiar with the benefits of an integrated between Eloqua and SFDC flow.

    The biggest limitation for me is that Web-to-lead in SFDC cannot accept as 500 prospects in a 24 hour period (out of the box he used to 500 per day, you can increase but at a cost)

    I would try to understand the concerns importance than what does Eloqua is just a call API with SFDC (pretty standard stuff and more robust than the Web-to-lead). Looks like they care about duplicates. Watching the process today - are you creating a new every delay of performance, or you are only creating a lead when a contact does not exist (this will reduce dupes, but can give you others challenges in terms of visibility of these contacts - depends on the appearance of your sales team in call lists.) If they use only lead views, could be a problem).

    List of imports - this should be good. Many SFDC admins using tools such as PeopleImport to handle the loads list and can manage settings to avoid duplication, do not create a lead when a contact already exists, etc.

  • Using expdp and impdp in the instantiation of stream data.

    Hi all


    I need to configure the flow level table for 5 tables between 2 databases (version 10.2.0.5). I need to export those tables from the source to the target and want to use expdp/impdp. In order to maintain the instantiation using exp ' object_consistant = y' and imp ' streams_instantiation = y' are specified. I like to use the expdp until must be specified instead of ' object_consistant = y' and in the same way, which is the replacement of ' streams_instantiation = y' in impdp.

    If anyone has an example or follow the installation steps streams at the level of the table that would be an excellent place to start help.

    Thanks in advance for your support and help.
    Shashi

    Once you have instantiated table on the source site, the data exported and imported on the target site.
    It is easy instantiate the target source following YVERT table tables:

    set lines 190 pages 66
    
    -- Prepare the table for streams capture. Once this command is executed any DML against the table
    -- will be captured, irrelevant of streams configuration state on source and apply. If no capture process,
    -- or propagation process is yet active, Streams will simply wait untill everything is clear to mine logs starting
    -- from this SCN.
    
    execute DBMS_CAPTURE_ADM.PREPARE_TABLE_INSTANTIATION(table_name => 'OWNER.TABLE');
    
    -- You can see on source DB the SCN
    
    SELECT
        TABLE_OWNER,TABLE_NAME,
        SCN,
        to_char(TIMESTAMP,'DD-MM-YYYY HH24:MI:SS') ti
    FROM
        dba_capture_prepared_tables
    ORDER BY table_owner;
    
    -- export the data here and configure the apply process.
    -- once the apply process is configured, before starting the apply process,
    -- run on  target DB to check the SCN status. Compare the following with query on source.
    
    COL objt HEADING 'Object| Type' FORMAT A9
    COL own_obj HEADING 'Object Name' FORMAT A45
    COLUMN lnk HEADING 'Using|Dblink' format A18
    COL SOURCE_DATABASE HEADING 'Source Database' FORMAT A38
    COL INSTANTIATION_SCN HEADING 'Instantiation| SCN' FORMAT 999999999999 justify c
    
    SELECT
          distinct source_database,
          source_object_owner||'.'||source_object_name own_obj,
          source_object_type objt,
          instantiation_scn,
          apply_database_link lnk
    FROM
         DBA_APPLY_INSTANTIATED_OBJECTS
    ORDER BY 1,2;
    
    -- if SCN are missing then
    
    execute DBMS_APPLY_ADM.SET_TABLE_INSTANTIATION_SCN(
             source_object_name=> 'OWNER.TABLE',
             source_database_name => '' ,
             instantiation_scn => nn );   --  where nn is taken from the query above on capture site for the relevant table.
    
     
    
  • Posts PDF - Expiration Date

    Is it possible to postpone the due date on a PDF posts after the

    PDF has been created and that the date has passed, without recreating the entire document again?

    You talk about here shared reviews when you say "posts PDF?

    If so, then the answer is Yes, if you are the creator/initiator of the review. This can be done from the Tracker.

  • How can I search my posts sorted by date?

    Hi hussein.

    I am recovering all my messages in this forum and I had TI sort 'alpha', how do I sort by date?

    Thank you

    MsK

    Moreover, I saw that you have successfully updated my last 2 posts, but when I clicked it, I don't see your answer yet.
    a little weird? as the server is too slow?

    Hello

    I am recovering all my messages in this forum and I had TI sort 'alpha', how do I sort by date?

    I don't think, you can sort by date, but you can click on your profile, then click on 'Search all messages for the user' and select the range of "dates".

    Moreover, I saw that you have successfully updated my last 2 posts, but when I clicked it, I don't see your answer yet.
    a little weird? as the server is too slow?

    You must refresh the page, it often happens after validation, and I need to refresh the page to see the new update.

    Kind regards
    Hussein

Maybe you are looking for

  • laptop do not synchronize with the desktop computer

    set my desktop to 12 + hours of synchronization. an hour ago, tried to sync my laptop to the stored data. some of the Add-ons seem to be transferred but any bookmark or scrapbook. the album, including a few hundred MB of data stored on my hard drive,

  • Profiles of Windows XP not loading not at all

    Hello I had two user profiles and none of them will load. When I click on the name of the profile, it says "loading your personal settings...". "but it never loads. I tried to keep my computer for an hour or two, but it never shows the office. The sy

  • 8.15.10.2202

    I have a HP Pavilion dv6 Notebook PC, product number XG738UA #ABA. Flash has stopped working for me after I've updated. I get useful things like... The application databases NameFirefox Version8.0.1 User AgentMozilla/5.0 (Windows NT 6.1; WOW64; RV:8.

  • In need of SERIOUS help blackBerry smartphones

    OK, so I just bought A BB today and that he was trying to add my friends from abroad, but all I get is waiting, done some reading on various forums and I'm confused now more than ever, because I 10pounds on the phone, but can not access BB app world

  • XMLTYPE data to be included

    Hellosomeone has an idea to easily display the data in a region of type tree? The data source is an XMLTYPE table.Thanks in advance.Kind regardsMartin