troubleshooting Question

fakepath ajax post for uploading files to separate php file

Avatar of ROM
ROMFlag for United Kingdom of Great Britain and Northern Ireland asked on
PHPjQueryAJAX
12 Comments1 Solution16 ViewsLast Modified:
Hi All,
I am trying to ajax upload some files as part of a fluid process in the interface. Various things happen to the text file later etc..

I realise that a POST works. But I want to do as part of my ajax with other field information so that I can execute MySQL statements also etc.. etc..

First time I have done through ajax and there is a lot of information out there and numerous multi step procedures ....but cannot follow.

Please can you help me understand what to change so I actually upload the file. I do not need to see the path at all.. but obviously need it for the uploader the other side.

Using:

    var file = document.getElementById("myfilefield").files[0]; //JUST filename.
    var file = document.getElementById("myfilefield").value; // FAKEPATH in path.



Open in new window

I push this into an array with a some various text like user, reference etc.... It is an array as I may do up to 10x at once in the entire process of uploading, interpreting and storing data from the file

but of course the POST is c:\fakepath so my upload fails.

Please advise.

Many thanks in advance

R
ASKER CERTIFIED SOLUTION
leakim971
Multitechnician
Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 12 Comments.
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>

Mike

Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 12 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004