AJAX CORS - send a picture in an entry of type 'file' via FormData

Hello BC Community!

I have a simple HTML form, I use new FormData on in Javascript.  It is then sent using AJAX to another domain (PHP server), that all works well, until I have add in the field input type = 'file', but then I get an error of CORS in the console.

I'm trying so AJAX a file (in this case an image) for this send directly to another domain that holds my PHP script to save the image.

I've tested this sending two other servers non - BC and I did not have this problem.  I can send it from the BC server but using the http:// Protocol that works also.  But when you use https://*.worldsecuresystems via AJAX for https://www.myphpserver.com/somescript.php he fails again.

I guess my request is, of https://*.worldsecuresystems , is there a setting that constantly get security British Colombia?  Or maybe I'm missing a parameter/header am build in my AJAX request? Something like Allow-Access-Control-Credentials: true, to allow the session to analyze?

My apologies for my complicated question, any help or an example would be appreciated.

Hi mstoichi,

Thanks for answer you, at first, it was original Access blocked, however, with a few corrections of Protocol and .htaccess on the remote server, I was able to get through this.

It turns out that the culprit in question was using jQuery 1.4.1, which had a bug.

This problem has been fixed in 1.7.1 and using 1.12 this problem is completely resolved, what a headache, I just hope this can help someone else!

Thank you very much.

Tags: Business Catalyst

Similar Questions

  • Can send you pictures by using Skype and iphone 4S?

    Can send you pictures by using Skype and iphone 4S? If so, how? Thank you

    I di as described above and it worked. The only difference is that I should select more info for sending the photo. Thanks S.P - translation!

  • How to send a picture with ClientTCPWrite

    Hello

    I would like to send a large picture (in fact a photo) to another computer via a TCP server.

    I already use the library to Support TCP to send data to a software that is running on another computer and it works well.

    So I did the same thing with an array of integers, and it does not work. I used the sample of Labwindows to send this table, and that the first part of the table is received aid.

    I don't understand.

    int SendImage(BYTE *lDataToWrite)
    {
    DWORD dwWaitResult;
    int bytesToWrite;
    int bytesWritten;
    int messageSize;

    If (giTCPConnected1 is TRUE)
    {
    bytesToWrite = messageSize = sizeof (BYTE) * WIDTH * HEIGHT;
    While (bytesToWrite > 0)
    {
    bytesWritten = ClientTCPWrite (giTcpConnection1 & lDataToWrite [messageSize - bytesToWrite], bytesToWrite, 0);
    bytesToWrite = bytesWritten;
    }
    }

    Return (ERROR_NO_ERROR);
    }

    	Tab WORD [WIDTH * HEIGHT];

    ...
    ...

    int CVICALLBACK ReceiveTcpMsg(unsigned hdl, int event, int error, void *callbackData) {}
    int iDataSize;
    int i, j;

    DWORD dwWaitResult;
    int bytesToRead;
    int bytesRead;

    switch (event)
    {
    case TCP_CONNECT:
    giTcpConnection = hdl;
    giLineConnected = TRUE;
    break;

    case TCP_DATAREADY:
    Reading data tcp/ip

    bytesToRead = messageSize = sizeof (WORD) * WIDTH * HEIGHT;
    While (bytesToRead > 0)
    {
    bytesRead = ClientTCPRead (giTcpConnection, & Tab2 [messageSize - bytesToRead], bytesToRead, 0);
    bytesToRead = bytesRead;
    }

    break;

    case TCP_DISCONNECT:
    giLineConnected = FALSE;
    break;
    }
    Return (0);
    }

    Is that someone has already used these functions to a large size?

    Or you know other ways to send a picture to another software?

    Thank you for your help.

    Benjamin

    When I had to do something similar to your task, I found more comfortable to split the expedition into smaller pieces (more or less 3-4 k bytes of each for example).

    It also gave me the ability to monitor the process of ethe and finally to interrupt.

  • I can send e-mail messages, but when I try to send a picture, my system gives me an error message - 0 x 80048862.

    Program network networking Internet website website URL website network

    How can I fix it?

    Hello

    1. What is the operating system installed on your computer?

    2. what (Outlook, Windows mail or Webmail) mail client do you use?

    3. What is the size of the mail you want to send?

    Please provide more information on this problem in order to help you best.

    See also the below mentioned link.

    http://Windows.Microsoft.com/en-us/Windows-Vista/demo-send-your-pictures-in-e-mail

  • When I try to send a picture through Windows Live Mail I get an error message telling me to delete the picture, and then try again.

    When I try to send a picture through Windows Live Mail I get an error message telling me to delete the picture, and then try again.

    original title: RECEIVES the MESSAGE of ERROR WHILE SENDING AND RECEIVING PHOTOS

    Hello Jane,.

    The best place to ask your question of Windows Live is inside Windows Live help forums. Experts specialize in all things, Windows Live, and would be delighted to help you with your questions. Please choose a product below to be redirected to the appropriate community:

     

    Windows Live Mail

    Windows Live Hotmail

    Windows Live Messenger

     

    Looking for a different product to Windows Live? Visit the home page Windows Live Help for the complete list of Windows Live forums to www.windowslivehelp.com.

  • I'm trying to send some pictures of my photos and I get this error message

    I'm trying to send some pictures of my photos and I get this error "host 'SMTP' could not be found. Please check that you have entered the server name correctly. "Account: 'POP3', server: 'SMTP', Protocol: SMTP, Port: 25, secure (SSL): no, Socket error: 11001, error number: 0x800CCC0D" can someone help me

    What email program are you using? Unless you use an e-mail client, start a new message, and then attach the photos.
  • I can no longer send you pictures via my Panasonic Lumix program or the range of file photos. I can via Windows Live Mail but it is tedious to do.

    I can no longer send you pictures via my Panasonic Lumix program or the range of file photos.  I can via Windows Live Mail but it is tedious to do.  The problem started when I change my ISP AOL to Comcast (I think).  When I try to do as I have always done in the past, I get this message:

    Here is the message I get:
    The message could not be sent. The authentication setting are may not be wrong for your e-mail [SMTP] Server outgoing. To resolve this issue, go to help, search for "Troubleshoot Windows Mail" and read the section "I have problems sending e-mail". If you need help to determine the appropriate server settings, contact your e-mail service provider. The rejected e-mail address was '{removed email address}'. ' Subject ' Emailing: PTC Joan Huntsman 001.jpg, account: 'Imap', server: 'smtp.comcast.net', Protocol: SMTP, server response: ' 550 5.1.0 required authentication ', Port: 587, secure (SSL): no, Server error: 550, error number: 0x800CCC78

    Help!  Thank you

    original title: have trouble sending pictures

    How can I set up/configure Outlook Express, Windows Mail & Windows Live Mail to E-mail from Comcast?
    http://customer.Comcast.com/pages/FAQViewer.aspx?GUID=5be34cb1-B190-4FC1-BEAA-818778a54aed

  • How can I send a picture of my office by email to my cell phone__

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    How can I send a picture from my office to my phonw cell, I don't know if an application exists which allows me to do, or how can I transfer the photo on my phone memory card? Ideas:

    • You have problems with programs
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    If you do not have e-mail from your wireless provider, or they do not allow attachments sent from a computer, just to get a SD memory card reader. Stick the card in the reader. Plug it into a USB port and drag the pix on him. Works just like a flash drive.

    This is just an example:
    http://www.Amazon.com/ELAGO-speed-memory-reader-writer/DP/B0028Y9BX8

    Google for them. I bought 4 GB cards with a drive for less than $10.00 on eBay. Bruce Hagen MS - MVP [Mail]

  • Cannot send/receive pictures via the BlackBerry Q10 Q10 blackBerry text

    Someone else do the new update and you are unable to send/receive pictures via text? I get an error "General problems" which tells me nothing. I've restarted and nothing works. I wish that I have never update could someone please help me. Thank you

    New...

    1. that already set you your incoming message? I think you set never receive MMS (multimedia media services)

    2. you can ask your provider to help the setting of their side...

  • Send a picture in e-mail...

    Hello

    I use JDE v4.3 and specifically target the BlackBerry Curve models.

    My requirement is to send a picture in e-mail...

    that is, when the user opens the application, there should be an option of camara and it should be able to take a photo and send it immediately to an e-mail address (I can access the camera until now..)

    I am quite new to the BlackBerry development, can anyone so suggest some ideas to achieve this feature?

    Thank you...

    Anyway thanks for your reply...

    Finally I solved it... I'm also not sure what the reason was. However, I removed all my network connections and protection disabled antivirus and firewall. And it worked. But what is important after that I enabled all the stuff and tried. This time, he continued to work...

  • try to send a picture, it says not enough memory

    He tried to send a picture says: not enough memory

    That will never fly. Server size limits vary most between 10 ~ 50MB. Gmail is 25 MB.
     
     
    Download the image to a site like Photobucket or SkyDrive and just the link by e-mail.
     
     
  • When I send a picture to Lightroom Develop module, image Navigator shows very well, but not not the image complete.  All I get is a blue background, where the image should be. What is happening with this?  I just installed Lightroom and Photoshop CC on a

    I used Photoshop and Lightroom for years and upgraded to CC about 6 months ago.  I just got a new computer and downloaded Lightroom and Photoshop CC on the new machine.  In Lightroom, when I send a picture to the develop module, all I get is a blue screen, where the image should be.  The navigation signs and develop panels show very well, but the image does not appear on the main screen.  It appears in the browser.  What's up with that?

    Disable the CPU graph use in the performance of the LR preferences tab. Blue box will be gone, Image will show.

  • How can I manually add an entry to the file passwords and username registered

    If possible, I would like to manually add an entry in the file of saved passwords. I suspect that's not possible, but I thought I'd ask just in case.

    Use this extension:
    https://addons.Mozilla.org/en-us/Firefox/addon/saved-password-Editor/

  • entry of the file type, how to filter only .csv

    use firefox 21.0
    use < input type = "file" accept = "xxx" / >

    How to filter only .csv (* not include all the files) when scour dialogue

    I try to use

    .CSV (view all)

    text/csv (.csv and show all files)

    application/csv (view all)

    text /-comma - separated values (view all)

    Help me, please
    Thank you
    Jean-Pierre

    It looks that there is work still to be done:

    • bug 826176 - support of file extension to < entry < = "" accept = "..." "li =" ">

    Please, do not comment in the bug reports: https://bugzilla.mozilla.org/page.cgi?id=etiquette.html

  • How to send / receive files via Wifi Direct... ?

    I found this bike e wifi Direct support. I tried to send files via wifi direct, but I couldn't.

    How to send / receive files with direct wifi without installing any 3rd party application... ?

    Uses of direct wifi... ?

    Sorry about that. Can be a regional thing, I'm not familiar with.

    Back to my question - what types of files you try to move?

Maybe you are looking for

  • My entries multiply contacts

    Contacts is multiplying my entries, which uses a lot of CPU and slow down the machine Contacts are multiplicatred on Icloud too SB got a solution for it I'm now trying to remove iCloud fromr piece by piece

  • Multi-port USB update

    My MacBook 2015 nagging guard update map MULTIPORT USB software. I did it several times and each time I get "update successful". Shortly after that I get a prompt to update. I checked the version in the system report and it's showing 1.58 and 2.33 no

  • Firefox is rendered pages as random characters.

    Not all pages, but he did that on Twitter for a few days and Google as of today. I'm running in Mode safe in this form and get this. http://imgur.com/ccBx7

  • Screensavers

    I had problems trying to get one of my screensavers to stay for awhile... This problem has just started and I am not very knowledgeable on the computer I was wondering if anyone had any ideas where I'd find the problem and fix it said... Please, plea

  • Task 16-bit system error timed out when I try to load a game

    Before, I have upgraded to windows XP pro (my media center windows download not more) and all the games I had worked.  Now that I've updated (sp 2 & 3) I get the 16-bit application error message has expired on all I've tried to download. Running a VI