diff --git a/core/includes/file.inc b/core/includes/file.inc
index c0cefa5..66d57d9 100644
--- a/core/includes/file.inc
+++ b/core/includes/file.inc
@@ -473,7 +473,13 @@ function file_create_url($uri) {
     else {
       // If this is not a properly formatted stream, then it is a shipped file.
       // Therefore, return the urlencoded URI with the base URL prepended.
-      return $GLOBALS['base_url'] . '/' . UrlHelper::encodePath($uri);
+      $options = UrlHelper::parse($uri);
+      $path = $GLOBALS['base_url'] . '/' . UrlHelper::encodePath($options['path']);
+      // Append the query.
+      if ($options['query']) {
+        $path .= (strpos($path, '?') !== FALSE ? '&' : '?') . UrlHelper::buildQuery($options['query']);
+      }
+      return $path;
     }
   }
   elseif ($scheme == 'http' || $scheme == 'https') {
