13 Commits

Author SHA1 Message Date
pikanji
54ab6f080a Use cms.storage.uploads.disk instead of filesystem.default
Fixes #3332.
FileUpload widget uploads file to the disk specified by default in config/filesystem.php instead of storage.uploads.disk in config/cms.php, if we use System\Models\File following the instruction in here.
Although we can still create another class extending System\Models\File or October\Rain\Database\Attach\File and use it as the model for attachOne/Many relation, System\Models\File seems to be the one that responsible to look at storage.uploads.disk in config/cms.php, because the existing methods are using storage.uploads.*.
Credit to @pikanji
2018-01-01 17:04:47 -06:00
Samuel Georges
5aa351f67c System files should return fully qualified path
- Not sure how this was not fixed sooner, since there is no easy way to obtain a full qualified URL from a system file.
- If a CDN is used this method will return a URL.
- The asset combiner returns a FQ URL as well, although it didn't always, perhaps this is a relic from that time that was never retrofitted.
2017-02-18 12:23:31 +11:00
Samuel Georges
676196d304 Use starts_with instead of regex 2016-07-16 15:34:20 +10:00
Pásztor Gábor
537f637e47 Storage path 2016-01-15 10:07:39 +01:00
Ariel Ponce
604a7ff465 Update getStorageDirectory method to allow custom folder names
See https://github.com/octobercms/library/pull/120
2015-08-18 15:42:26 +02:00
Samuel Georges
54fe8452e5 uploadsPath -> cms.storage.uploads.path 2015-02-23 19:55:41 +11:00
Samuel Georges
027af0dd9f Switch to our own internals for local storage
The local storage driver is not suitable because it does not apply the appropriate permissions to local files. This is a big issue especially for shared hosting where the webserver will create a file and the owner is locked from touching it. We detect the local driver and use the FileHelper class whenever a file or directory is created. Eg: if configured to apply chmod 777 then it will be fulfilled as expected.
2015-02-22 14:04:38 +11:00
Samuel Georges
a9a3336d11 * Build 199 *** NB: /uploads -> /storage/app/uploads
The /uploads directory has been moved to /storage/app/uploads to make way for CDN support. This directory should be moved on the file system and the config (cms.uploadsPath) updated.
2015-02-19 19:12:36 +11:00
Samuel Georges
7145aac457 Prepare for CDN, config rename cms.plugins|themes|uploadsDir -> cms.plugins|themes|uploadsPath
Deprecate data-trigger-type on triggerapi
Fixes ref to Util class
2015-02-17 20:58:38 +11:00
Sam Georges
c83797231d Subsequent expressions are on a new line (see developer guide > PSR exceptions) 2014-11-01 12:00:45 +11:00
Stefan Talen
f85087eac6 Updating modules/system 2014-10-18 11:58:50 +02:00
Sam Georges
7802213bcc Fixes #55 - Assets are now referenced correctly as Assets instead of URLs 2014-06-26 17:29:07 +10:00
Sam Georges
71a5dd67ab Welcome to the world, October :-) 2014-05-14 23:24:20 +10:00