diff options
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r-- | indra/newview/llviewermedia.cpp | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 114f1d327b..9dd8b00ef6 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3480,22 +3480,40 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla case LLViewerMediaObserver::MEDIA_EVENT_PICK_FILE_REQUEST: { - // Display a file picker - std::string response; - LLFilePicker& picker = LLFilePicker::instance(); - if (!picker.getOpenFile(LLFilePicker::FFLOAD_ALL)) + std::vector<std::string> responses; + + bool pick_multiple_files = plugin->getIsMultipleFilePick(); + if (pick_multiple_files == false) { - // The user didn't pick a file -- the empty response string will indicate this. + picker.getOpenFile(LLFilePicker::FFLOAD_ALL); + + std::string filename = picker.getFirstFile(); + responses.push_back(filename); } + else + { + if (picker.getMultipleOpenFiles()) + { + std::string filename = picker.getFirstFile(); - response = picker.getFirstFile(); + responses.push_back(filename); - plugin->sendPickFileResponse(response); + while (!filename.empty()) + { + filename = picker.getNextFile(); + + if (!filename.empty()) + { + responses.push_back(filename); + } + } + } + } + plugin->sendPickFileResponse(responses); } break; - case LLViewerMediaObserver::MEDIA_EVENT_AUTH_REQUEST: { LLNotification::Params auth_request_params; |