24f4ca58243b59934e397088c0cf54fd5df200e8
[WebKit.git] / Websites / perf.webkit.org / public / include / uploaded-file-helpers.php
1 <?php
2
3 function format_uploaded_file($file_row)
4 {
5     return array(
6         'id' => $file_row['file_id'],
7         'size' => $file_row['file_size'],
8         'createdAt' => Database::to_js_time($file_row['file_created_at']),
9         'mime' => $file_row['file_mime'],
10         'filename' => $file_row['file_filename'],
11         'author' => $file_row['file_author'],
12         'sha256' => $file_row['file_sha256']);
13 }
14
15 function uploaded_file_path_for_row($file_row)
16 {
17     return config_path('uploadDirectory', $file_row['file_id'] . $file_row['file_extension']);
18 }
19
20 ?>