Content Delivery Network (CDN) - optional, for either uploads only or both uploads & extras (rfe 9134)
This commit is contained in:
parent
d6696f8a7e
commit
acd3fded45
8 changed files with 646 additions and 11 deletions
|
|
@ -42,6 +42,28 @@ These methods are available from this class:
|
|||
|
||||
=cut
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 fromHex ( hexId )
|
||||
|
||||
Returns the guid corresponding to hexId. Converse of toHex.
|
||||
|
||||
=head3 hexId
|
||||
|
||||
Hex value to convert to guid.
|
||||
|
||||
=cut
|
||||
|
||||
sub fromHex {
|
||||
my $self = shift;
|
||||
my $hexId = shift;
|
||||
my $binId = pack('H2' x 16, unpack('A2' x 16, $hexId));
|
||||
my $id = substr(encode_base64($binId), 0, 22);
|
||||
$id =~ tr{+/}{_-};
|
||||
return $id;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 DESTROY ( )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue