2022-04-01 22:22:33 +00:00
|
|
|
accessing
|
|
|
|
exportProfileImageOn: fileReference
|
|
|
|
|
2022-04-25 14:13:04 +00:00
|
|
|
| file |
|
2022-04-01 22:22:33 +00:00
|
|
|
file := fileReference asFileReference.
|
2022-04-25 11:26:54 +00:00
|
|
|
file exists ifFalse: [
|
|
|
|
file ensureCreateFile.
|
2022-04-07 16:28:18 +00:00
|
|
|
file binaryWriteStreamDo: [ :stream |
|
2022-04-25 11:26:54 +00:00
|
|
|
stream nextPutAll: profileImageUrl asUrl retrieveContents ].
|
2022-04-25 14:13:04 +00:00
|
|
|
self class inform: 'Exported as: ', String cr, file fullName.
|
2022-04-25 11:26:54 +00:00
|
|
|
^ file
|
|
|
|
].
|
2022-04-25 14:13:04 +00:00
|
|
|
self downloadWithRenaming: fileReference
|