Hello everyone, I am in need of some help. I have been asked to enable CDN for assets uploaded to Strapi. When the link to the asset is visited, they want the CDN link to be used instead. I am reading the documentation here: Upload - Strapi Developer Documentation and I have seen this package: strapi-provider-upload-aws-s3-plus-cdn - npm
but I am new to Strapi and could use some hand holding to get started. If anybody would be kind enough to help the new guy out I would really appreciate it. It is my 2nd day at my very first job as a web developer. I’m starting to get major imposter syndrome trying to figure out where to start and all the things I will need to do to get this working. I am also new to Strapi so if anybody would be willing to explain it like I’m a complete beginner, I am. I am testing locally on my Windows 10 machine but the server the client is using is nginx/1.15.6. Thanks again.
Thank you @Stun3R I really appreciate your response and encouragement. I will be trying to add the CDN URL on this all next week and will update you with my progress. I would also like to use our personal domain like the example: https://assets.mydomain.com instead of the CDN url and I think I will need to edit DNS configuration for that. Right now I’m just trying to wrap my head around everything before I start trying things without a plan.
Hey Stun3R,
I have been trying for hours to get this plugin working, and I have everything filled out, but every time I create the file at ./config/plugins.js I get error: “Cannot read property ‘defaultConnection’ of undefined”
When the file at ./config/plugins.js is blank, everything works, but as soon as I add anything in it, even a blank module.exports = () => ({}) I get the error. The Strapi I am working with is 3.0.0-beta.17.5.
I will request, but unfortunately this is a project I am not in control of so I can only ask. I see they already have aws-s3-with-custom-domain plugin installed, but I cannot see where they set it up.
Edit: I got it working - It seems I needed to get rid of node_modules and npm install again. Now on to the next task.
Hey @Stun3R , this is turning out to be quite the task. I am following Migrate to beta.18 - Strapi Developer Documentation which is to be one of many guides I will need to follow to get to the current version. I have followed all steps and when I run ‘npm run develop’ I am running into this error:
error TypeError: Cannot convert undefined or null to object
at Function.values ()
at Object.load (C:\Users\mainuser\files\web\strapi\strapiproject\test-project\node_modules\strapi-database\lib\connector-registry.js:17:39)
Edit: I’ve commented out the ssl options in database.js for now. The server starts with npm run develop but now I only receive this from the browser: {“statusCode”:404,“error”:“Not Found”,“message”:“Not Found”} No urls work anymore. I have been at this for hours and am exhausted. Every upgrade worked except this last one this is so frustrating!
I’ve gotten all upgrades done successfully but on the final move to 3.0.0 I am stuck at error Error: The server does not support SSL connections
I’ve fixed everything so far and I found the problem. The language settings in middleware. If I set language : { enabled: true} everything breaks. When it set it to false it works again. I have no idea why or how important it is to my client. I will have to ask.
Hey @Stun3R, I have a new problem when upgrading from 3.1.7 to 3.2.3. After following all instructions I get this error when running npm develop:
error Bootstrap function in plugin “users-permissions” failed
[2021-05-12T02:09:56.179Z] error error: update “users-permissions_permission” set “role” = $1, “created_by” = $2, “updated_by” = $3 where “id” = $4 returning * - column
“created_by” of relation “users-permissions_permission” does not exist
Unfortunately searching for this on Google returns nothing and I am at a standstill.
I commented out the ssl code and it worked, and yes I delete and rebuild .cache, build, node_modules, and package-lock.json every upate. I was able to get the desired plugin working on 3.1.7 so my client has started another project for Strapi. Maybe this will be a new install, I’m not sure yet. I really appreciate all the support from you! I’ll keep you posted in this thread how things go.