Version 1
[yaffs-website] / web / modules / contrib / dropzonejs / src / UploadHandlerInterface.php
1 <?php
2
3 namespace Drupal\dropzonejs;
4
5 use Symfony\Component\HttpFoundation\File\UploadedFile;
6
7 /**
8  * Interface UploadHandlerInterface.
9  */
10 interface UploadHandlerInterface {
11
12   /**
13    * Reads, checks and return filename of a file being uploaded.
14    *
15    * @param \Symfony\Component\HttpFoundation\File\UploadedFile $file
16    *   An instance of UploadedFile.
17    *
18    * @return string
19    *   The sanitized filename.
20    *
21    * @throws \Drupal\dropzonejs\UploadException
22    */
23   public function getFilename(UploadedFile $file);
24
25   /**
26    * Handles an uploaded file.
27    *
28    * @param \Symfony\Component\HttpFoundation\File\UploadedFile $file
29    *   The uploaded file.
30    *
31    * @return string
32    *   URI of the uploaded file.
33    *
34    * @throws \Drupal\dropzonejs\UploadException
35    */
36   public function handleUpload(UploadedFile $file);
37
38 }