File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -15,17 +15,13 @@ public function __construct($api_key, $api_url = 'https://api.tabscanner.com/')
1515 $ this ->api_url = $ api_url ;
1616 }
1717
18- public function upload ($ file , $ credit = 0 )
18+ public function upload ($ file , $ user_id = 0 )
1919 {
2020 $ client = new Client ();
2121 $ api_upload_url = $ this ->api_url . $ this ->api_key . '/process ' ;
2222 $ file_type = gettype ($ file );
2323 $ validate = $ this ->validate ($ file );
2424
25- if ($ credit ) {
26- $ api_upload_url = $ this ->api_url . $ this ->api_key . '/process/ ' . $ credit ;
27- }
28-
2925 if ($ validate ['error ' ]) {
3026 $ response = [
3127 'message ' => $ validate ['message ' ],
@@ -60,6 +56,14 @@ public function upload($file, $credit = 0)
6056 'name ' => 'file ' ,
6157 'filename ' => $ filename ,
6258 'contents ' => $ content
59+ ],
60+ [
61+ 'name ' => 'lineExtract ' ,
62+ 'contents ' => true
63+ ],
64+ [
65+ 'name ' => 'dashboardUserId ' ,
66+ 'contents ' => $ user_id
6367 ]
6468 ]
6569 ]);
You can’t perform that action at this time.
0 commit comments