File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed
content/php-client/resources Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,13 @@ $product = $client->getAssetReferenceFileApi()->downloadFromLocalizableAsset('ch
58
58
file_put_contents('/tmp/chicagoskyline.jpg', $product->getContents());
59
59
```
60
60
61
+ From the v4 of the PHP client, the response is returned instead of the content. It allows getting the filename and the MIME type from the response.
62
+ You can get the content this way:
63
+
64
+ ``` php
65
+ file_put_contents('/tmp/chicagoskyline.jpg', $product->getBody()->getContents());
66
+ ```
67
+
61
68
#### Download a reference file of a not localizable asset
62
69
63
70
``` php
@@ -68,6 +75,13 @@ $product = $client->getAssetReferenceFileApi()->downloadFromNotLocalizableAsset(
68
75
file_put_contents('/tmp/bridge.jpg', $product->getContents());
69
76
```
70
77
78
+ From the v4 of the PHP client, the response is returned instead of the content. It allows getting the filename and the MIME type from the response.
79
+ You can get the content this way:
80
+
81
+ ``` php
82
+ file_put_contents('/tmp/bridge.jpg', $product->getBody()->getContents());
83
+ ```
84
+
71
85
#### Upload an asset reference file for a localizable asset
72
86
73
87
``` php
Original file line number Diff line number Diff line change @@ -60,6 +60,13 @@ $product = $client->getAssetVariationFileApi()->downloadFromLocalizableAsset('ch
60
60
file_put_contents('/tmp/chicagoskyline-mobile.jpg', $product->getContents());
61
61
```
62
62
63
+ From the v4 of the PHP client, the response is returned instead of the content. It allows getting the filename and the MIME type from the response.
64
+ You can get the content this way:
65
+
66
+ ``` php
67
+ file_put_contents('/tmp/chicagoskyline-mobile.jpg', $product->getBody()->getContents());
68
+ ```
69
+
63
70
#### Download a variation file of a not localizable asset
64
71
65
72
``` php
@@ -70,6 +77,13 @@ $product = $client->getAssetVariationFileApi()->downloadFromNotLocalizableAsset(
70
77
file_put_contents('/tmp/bridge-mobile.jpg', $product->getContents());
71
78
```
72
79
80
+ From the v4 of the PHP client, the response is returned instead of the content. It allows getting the filename and the MIME type from the response.
81
+ You can get the content this way:
82
+
83
+ ``` php
84
+ file_put_contents('/tmp/bridge-mobile.jpg', $product->getBody()->getContents());
85
+ ```
86
+
73
87
#### Upload an asset variation file for a localizable asset
74
88
75
89
``` php
@@ -85,3 +99,4 @@ $client = new \Akeneo\Pim\ApiClient\AkeneoPimEnterpriseClientBuilder('http://ake
85
99
86
100
$client->getAssetVariationFileApi()->uploadForNotLocalizableAsset('/tmp/bridge-mobile.jpg', 'bridge', 'mobile');
87
101
```
102
+
Original file line number Diff line number Diff line change @@ -33,6 +33,13 @@ $mediaFile = $client->getProductMediaFileApi()->download('code/example');
33
33
file_put_contents('/tmp/ziggy.jpg', $product->getContents());
34
34
```
35
35
36
+ From the v4 of the PHP client, the response is returned instead of the content. It allows getting the filename and the MIME type from the response.
37
+ You can get the content this way:
38
+
39
+ ``` php
40
+ file_put_contents('/tmp/bridge.jpg', $product->getBody()->getContents());
41
+ ```
42
+
36
43
#### Get a list of media file information
37
44
38
45
There are two ways of getting media files.
You can’t perform that action at this time.
0 commit comments