use wcf\system\request\LinkHandler;
use wcf\system\WCF;
use wcf\util\FileUtil;
+use wcf\util\StringUtil;
/**
* Represents an attachment.
return $this->getLocationHelper($location);
}
+ /**
+ * Migrates the storage location of this attachment.
+ */
+ public function migrateStorage() {
+ foreach ([$this->getLocation(), $this->getThumbnailLocation(), $this->getThumbnailLocation('tiny')] as $location) {
+ if (!StringUtil::endsWith($location, '.bin')) {
+ rename($location, $location.'.bin');
+ }
+ }
+ }
+
/**
* Returns the appropriate location with or without extension.
*