Категории
Уведомление:подпишитесь Заходите к нам в Telegram-чат
Skripters » Invision Community » Плагины » S3 Compatible Downloads 4.1

S3 Compatible Downloads 4.1

SaNcHeS
Опубликовано 7-08-2021, 18:12
Non-Amazon S3 storage services do work with IPS . Add your endpoint, key, secret, and sub-directory and custom url if needed, assign to some file category such as attachments or Gallery images and off you go! However, these Non-Amazon S3 services are NOT officially supported by IPS - that's because some of the internal methods have not been altered to handle them. These methods are hard-coded for Amazon S3 exclusively. The secret truth about most Non-Amazon S3 services that say they are 100% compatible with the S3 code-base is that there is ALWAYS SOMETHING that is not quite right, done slightly different, and so on.  Attachments  and Invision Community Downloads files are usually problematic with Non-Amazon S3 services. If you are merely displaying images and the like on the front end, none of this is a problem. It becomes a problem if your end-users are going to download these files - that is when you hit the exclusively IPS Amazon S3 code and the downloads will fail. For example, if you assign non-Amazon S3 storage to save IPS Downloads files, those files will not be downloadable. When the system attempts to make the download URL, it crafts that URL as if you were using Amazon S3, not some other S3-Compatible storage service. Sometimes it's a problematic signature match, sometimes the url itself isn't quite right. There are no settings and it will apply the changes to any non-Amazon S3 provider you add. This plugin intercepts the the URL creation method called on Amazon S3 file storage objects, checks to see if it is an actual Amazon S3 request, and then just passes it on through as usual. If it is NOT an Amazon S3 request, it must be an S3 compatible method, in which case I provide a rudimentary URL to patch this up . It isn't anything fancy: it ditches the signature and adds just enough headers to push out the actual file name and trigger your browser to download it. If the attachment or file in question is an image your browser might just pop it up in a new tab, in which case just right click and download it there. This has been tested with the usual modern browsers (minus Safari), and various file-types. All testing was successful. Free, support through the IPS Marketplace topic for now.  Free also means lay off the instantaneous demands for support. I use this too so it's in my interest to keep this going.  Keep in mind, this plugin solves a particular use-case on one of the sites I manage . Specifically attachment downloads on Wasabi. There is no CDN, and the file sizes are small. I could write a full-fledged file handler for the service but this hack solved my use-case easily and I can move on to other things. I figured people may want this hack, hence the plugin provided here for free. If you are looking for formal support for a specific service it will not be happening with this plugin. Feel free to code your own (or third-party contract) a crafted app with full support for the S3 service you need.    ATTENTION! Invision Community officially supports chunked uploads for Amazon S3 with version 4.5. This plugin DOES NOT. As mentioned before, although services are nominally "100% compatible" with Amazon S3 code, the devil is in the details, and, for example, Wasabi handles chunked uploads in a different fashion. My use-case that generated this plugin does not have file sizes that require chunking. That and I can craft the PHP settings to handle the file sizes I need already without chunking. Do not look for support for this feature with this plugin.   WARNING! The only item in the entire IPS Suite that marks files as private is IPS Downloads. This plugin will flag them as public. This means a few things: 1) If you are monetizing or otherwise require fully controlled  access to IPS Downloads files this is probably not the plugin for you. You will need to wait for complete 3rd Party S3 support, or at least specific mods to support other S3 providers. It really is just some hump work on getting the signatures correct (and it might be a V2 vs. V4 dance with varying providers as well, or underlying hitches in the built-in IPS S3 signature methods with 3rd party endpoints).  2) If you are using this plugin on an already existing bucket with Downloads files, those files will need to be flagged as public-read for them to download correctly. Again, this plugin is just getting rid of the signatures to allow public files to download correctly from 3rd-party S3 providers.    The following is old but probably still valid - no ones really posted up on other services for awhile. KNOWN COMPATIBLE SERVICES Delimiter obj.space (Not recommended - see Summer 2018 topics on various internet review sites regarding the company - stay away...) Digital Oceans Spaces Wasabi   NON-COMPATIBLE SERVICES If a service REQUIRES a signature for download URLs, even for public-read files, this plugin will not help you. The following services are known to require signatures for all download URLs.
Понравилось?
0
0
0

Скачать S3 Compatible Downloads 4.1:

S3 Compatible Downloads 4.1 Размер файла: 11.81 Kb
297
0