diff options
author | Kristian Monsen <kristianm@google.com> | 2011-01-13 10:57:20 +0000 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2011-01-13 11:29:56 +0000 |
commit | 06c187aa4a2bbcf7ade9ca809959b5d0a92ec5c6 (patch) | |
tree | 7aabc5fac4cdafebdae07446337b9baf9c77d7ee /WebKit/android/WebCoreSupport | |
parent | 3c1f14ff4e1f4842f74cb5e2b4df00c0d5354cbc (diff) | |
download | external_webkit-06c187aa4a2bbcf7ade9ca809959b5d0a92ec5c6.zip external_webkit-06c187aa4a2bbcf7ade9ca809959b5d0a92ec5c6.tar.gz external_webkit-06c187aa4a2bbcf7ade9ca809959b5d0a92ec5c6.tar.bz2 |
Use filename instead of file url for file uploads.
Part of fix for bug 2862096
Change-Id: Iabef7251b867b0c8bbf81147b08c76e7ef723d00
Diffstat (limited to 'WebKit/android/WebCoreSupport')
-rw-r--r-- | WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp b/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp index 29a97cc..02f4139 100644 --- a/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp +++ b/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp @@ -134,7 +134,10 @@ WebUrlLoaderClient::WebUrlLoaderClient(WebFrame* webFrame, WebCore::ResourceHand // Chromium check if it is a directory by checking // element.m_fileLength, that doesn't work in Android std::string filename = element.m_filename.utf8().data(); - if (filename.size() > 0) { + if (filename.size()) { + // Change from a url string to a filename + if (filename.find("file://") == 0) // Found at pos 0 + filename.erase(0, 7); base::Thread* thread = ioThread(); if (thread) thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(m_request.get(), &WebRequest::appendFileToUpload, filename)); |