diff --git a/src/Entities/File.php b/src/Entities/File.php
index <HASH>..<HASH> 100644
--- a/src/Entities/File.php
+++ b/src/Entities/File.php
@@ -45,13 +45,18 @@ class File
     {
         $host = parse_url($this->file, PHP_URL_HOST);
 
-        // If it has not an url host and it is a file_id
-        if ($host === null && !is_numeric($this->file)) {
-            // Then it is a local path
+        // If it has not an url host
+        if ($host === null) {
+            // Is the string a file_id?
+            if (preg_match('/^([\w\d]*[-_]*[\w\d]*)*$/', $this->file)) {
+                // It is a file_id
+                return false;
+            }
+            // It is local
             return true;
-        } else {
-            return false;
         }
+            // It is an url
+            return false;
     }
 
     /**
diff --git a/tests/corebottest.php b/tests/corebottest.php
index <HASH>..<HASH> 100644
--- a/tests/corebottest.php
+++ b/tests/corebottest.php
@@ -134,6 +134,8 @@ class CoreBotTest extends TestCase
         $this->assertArrayHasKey('document', $new_document);
 
         $this->assertArrayHasKey('caption', $new_document);
+
+        $bot->sendDocument($new_document['document']['file_id']);;
     }
 
     public function providerDocument()
Improve file sending

Check if a file given is a file_id by using a regex expression.

Add test sending a document using file_id.