On Jul 27, 2022, at 10:42 AM, 'Colin P' via ResourceSpace <resour...@googlegroups.com> wrote:
Hi, I see this thread hasn't had any posts in awhile. Is S3 file store support working? I'm setting up a new install for a client and I'd love to use S3 for the storage.--On Monday, August 2, 2021 at 6:24:57 PM UTC-5 nae...@gmail.com wrote:Another note to add here. I transferred images to S3, and then transferred by installation and previews to an EC2 instance on amazon. One thing that got me during that process was after I loaded the database and files into EC2 I had a persistent mkdir() permissions issue. Turns out the config_json field on the plugins table in the database for s3_storage has the filestore location stored, which was being used to supply the $storagedir variable, which was throwing the error. So, if you are moving your installation you will want to go into the database and edit this manually.On Sunday, August 1, 2021 at 1:31:46 PM UTC-4 Andrew McCullough wrote:Also, if you have a big filestore, don't forget to increase your $php_time_limit in config. I just set mine to 0 (no limit) and will change it back when I'm all done.On Sunday, August 1, 2021 at 1:17:11 PM UTC-4 Andrew McCullough wrote:A couple of notes for those coming after.I managed to get filestore transfer tool working. A few things:- variables in the migration script are called things like $s3_bucket. In the configuration file, the names of these variables has been updated to $s3_storage_bucket, so you will need to change the name in the migration script for it to work.- I had trouble with file extensions on original files. Images with .jpeg extensions would result in the wrong file path and were therefore not found when doing the upload. Apparently, this is just one of the limitations of the get_resource_path() API function? So in order to pass an explicit file extension to get_resource_path, I performed a get_resource_data on each $ref (this same change has to be made in step 2 and step 3):// Build array of the resource original file and alternative files to upload to a S3 bucket.$ref_original[0]['ref'] = 0;$ref_original[0]['file_extension'] = get_resource_data($ref)['file_extension']; #2021-07-31 ADDED file extension for original resource$ref_files = array_merge($ref_original + $alt_files);// Loop through resource original files and upload to S3.foreach($ref_files as $file){// Setup AWS SDK S3 putObject parameters.if($file['ref'] == 0){$s3filepath = get_resource_path($ref, true, '', false, $file['file_extension']); #2021-07-31 ADDED FILE EXTENSION to FIX FILE COULD NOT BE FOUND ERRORs$file_output = 'Uploading original file (';$file_info = 'Original file: ';}else{$s3filepath = get_resource_path($ref, true, '', false, $file['file_extension'], true, 1, false, '', $file['ref']);$file_output = 'Uploading alternative file (';$file_info = 'Original alternative file #' . $file['ref'] . ': ';}The script did not seem to work with any alternative files, which really didn't matter with my implementation, but if alternative files are important to you then it might be something you want to look into.A final note. Each time I ran the script, it started uploading files from the beginning. I think the intention is that the script will skip through resources that already exist in the S3 bucket, but that wasn't the case for some reason. No matter, but something to think about. I ended up hard-coding starting ref numbers on subsequent runs to avoid repeat uploads when I was debugging.I hope this helps someone in the future!Best,AndrewOn Thursday, July 29, 2021 at 12:37:09 PM UTC-4 Steve wrote:Updated ../hooks/upload_plupload.php to resolve issue with the Upload Log displaying twice. Also added installation instructions.On Wednesday, July 28, 2021 at 4:21:08 PM UTC-6 Steve wrote:Glad it is working ok.On Tuesday, July 27, 2021 at 6:25:40 PM UTC-6 nae...@gmail.com wrote:Agreed with Brian, thank you for your work on this--it is so great!On Tuesday, July 27, 2021 at 5:49:58 PM UTC-4 bgol...@gmail.com wrote:
Steve --Wow! Christmas came early! Thanks very much, Steve!BrianOn Tuesday, July 27, 2021 at 10:41:49 AM UTC-4 Steve wrote:The plugin is now available in GitHub: https://github.com/sdbowman/ResourceSpace-S3-Storage-Plugin.On Tuesday, July 27, 2021 at 7:45:13 AM UTC-6 Steve wrote:Brian- The attached ZIP file contains the latest S3 storage plugin that works with ResourceSpace v9.6. I suggest using this plugin, rather than the older branch that is not up to date. Place the plugin in the ResourceSpace ../plugins folder with the default plugins.Thanks, Steve.On Monday, July 26, 2021 at 4:35:59 PM UTC-6 bgol...@gmail.com wrote:I'm new to RS but have a working installation up. What I really need for our institution is to use it with S3 storage. Before attempting this, I want to confirm that I'm on the right track:1. I gather that, even with the new RS 9.6, Steve's way is the only way to enable S3 support. Thus, rather than install the latest distro from RS, I need to install the one from the following? https://svn.resourcespace.com/svn/rs/branches/sbowman/20201026_sbowman_s3_3/2. What version of RS is this branch based on?Thanks!BrianOn Saturday, January 16, 2021 at 12:08:24 PM UTC-5 nae...@gmail.com wrote:This is great and super timely for us (as we are moving a bunch of stuff over to AWS). I tested the S3 connection and so far it is working super well with uploads, download, and all the rest. A strange thing about the ResourceSpace installation from the branch though is that my resource view pages stop rendering after the download region:Not sure why this is the case and can't find anything in the logs, user is super admin, etc. etc.Sorry, this probably isn't a very helpful contribution but I thought I would put it out there in case anyone else is encountering the same...AndrewOn Monday, November 23, 2020 at 12:37:48 PM UTC-5 Steve wrote:The SVN branch https://svn.resourcespace.com/svn/rs/branches/sbowman/20201026_sbowman_s3_3/ contains the latest S3 object-based storage integration. The PDF at the branch root contains an overview, setup, and how the integration works.Steve
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.com
---
You received this message because you are subscribed to a topic in the Google Groups "ResourceSpace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/resourcespace/JT833klfwjc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to resourcespac...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/resourcespace/e35c5293-49a9-45ad-957e-e8eddc77144en%40googlegroups.com.