Skip to content

Commit

Permalink
Merge pull request #496 from appwrite/fix-input-file
Browse files Browse the repository at this point in the history
Fix twig templates to add InputFile imports
  • Loading branch information
Vincent (Wen Yu) Ge authored Jul 28, 2022
2 parents aab1435 + 136909a commit 2dfc5f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SDK/Language/Ruby.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public function getParamExample(array $param)
$output .= '{}';
break;
case self::TYPE_FILE:
$output .= "InputFile.fromPath('dir/file.png')";
$output .= "InputFile.from_path('dir/file.png')";
break;
}
}
Expand All @@ -302,7 +302,7 @@ public function getParamExample(array $param)
$output .= "'{$example}'";
break;
case self::TYPE_FILE:
$output .= "InputFile.fromPath('dir/file.png')";
$output .= "InputFile.from_path('dir/file.png')";
break;
}
}
Expand Down
3 changes: 3 additions & 0 deletions templates/ruby/docs/example.md.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
require 'appwrite'

client = Appwrite::Client.new
{% if method.type == "upload" %}
InputFile = Appwrite::InputFile
{% endif %}

client
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint
Expand Down

0 comments on commit 2dfc5f7

Please sign in to comment.