Explorar o código

Added getOriginalFilename method.

This is to be able to retrieve original filename when filename is set
via setFilename().
Romain Bruckert %!s(int64=9) %!d(string=hai) anos
pai
achega
975aca6db4
Modificáronse 1 ficheiros con 12 adicións e 2 borrados
  1. 12 2
      src/Resumable.php

+ 12 - 2
src/Resumable.php

@@ -38,7 +38,7 @@ class Resumable
     protected $filepath;
 
     const SLUGIFY = true;
-    
+
     public function __construct(Request $request, Response $response)
     {
         $this->request = $request;
@@ -47,7 +47,7 @@ class Resumable
         $this->log = new Logger('debug');
         $this->log->pushHandler(new StreamHandler('debug.log', Logger::DEBUG));
     }
-
+    
     public function process()
     {
         if (!empty($this->resumableParams())) {
@@ -82,6 +82,16 @@ class Resumable
     }
 
     /**
+     * Get final filename.
+     *
+     * @return string Final filename
+     */
+    public function getOriginalFilename()
+    {
+        return $this->originalFilename;
+    }
+
+    /**
      * Get final filapath.
      *
      * @return string Final filename