Welcome Guest, Not a member yet? Register   Sign In
where to download images to ?
#1

I am keeping user's images of documents in an S3 bucket. When they first login I get all of their images and download them to my server. They are getting put into /app/assets/uploads/ etc. I am concerned about keeping user images mixed in with my code. I am using CI3 and Docker. Can anyone recommend a better place to keep user's images and tell me how I can create a path to these files in CI3?
proof that an old dog can learn new tricks
Reply
#2

application
system
assets
public
-- index.php
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(07-24-2021, 04:15 AM)InsiteFX Wrote: application
system
assets
public
-- index.php
I don't see what that gets me? The folder doesn't need to be public since the only access is via my app. Are you saying I got nothing to worry about?
proof that an old dog can learn new tricks
Reply
#4

I have the same question above. Who can give me any suggestion?
Reply
#5

(07-24-2021, 04:15 AM)InsiteFX Wrote: application
system
assets
public
-- index.php


Please elaborate!!
Reply
#6

I have the same question above... Any Solution
Reply
#7

I would store them in a directory inside of the "writable" directory. That directory should always be writable when on your server you shouldn't get errors writing, and it keeps it out of the way of your application.
Reply
#8

(This post was last modified: 09-13-2021, 03:12 AM by paliz.)

I put it in this path public / upload /...

First time i put it writble i could read them in browser

Could not
Enlightenment  Is  Freedom
Reply
#9

That's true - if you need to be viewable from the browser you'd either have to:

1. create a controller/method to load the file and send it to the browser. This has the benefit of allowing security checks, URL rewriting, etc, if needed, but at the cost of another full page hit on your application for all of those images, which may be too steep of a drawback.
2. Create a symlink to the writable/uploads folder on your server. This also may or may not be ideal for your uses.
Reply
#10

(This post was last modified: 09-13-2021, 09:22 PM by ikesela.)

put in public folder, make a folder, public/upload

change folder ownership and permission to: $USER:www-data (to enable write access)

Code:
sudo chown -R $USER:www-data upload
Reply




Theme © iAndrew 2016 - Forum software by © MyBB