New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I configure s3 to use with depot and flask application factory way? #13
Comments
I found out that I could configure depot in the following manner for S3
because 'test' is the bucket... is there a way to upload to certain folders within the bucket? Or would it be better to have multiple buckets instead of one overall encompassing? If it is recommended that I use multiple buckets. How do I configure multiple buckets using one DepotManager? ex:
Thanks! |
I'm getting an error when I upload certain files above 1MB Have any of you ran into thej following problem before?
|
Looks like I'm not the only one having the same problem. And it seems like one of the many ways to solve this is wait for the dns? http://www.jacobtomlinson.co.uk/2014/07/31/amazon-s3-s3cmd-put-errno-32-broken-pipe/ |
Noticed now, have you tried setting explicitly the host in your DepotManager.configure call? |
@amol- Adding depot.host doesn't work either... I think it has to do with the dns on amazon. |
@rlam3 if it's related to dns it should have solved now after a few hours. Do you still face the issue? |
@amol- . yes it is. I was wondering if it was possible to be able to find out how the transfer rate from depot or if you are familiar of a feature like this. From what I understand so far, please correct me if I'm wrong... One depot configuration = one bucket. I'd like to know how I'm able to specify the path for which my objects will be created in because if I were to use s3 with cloudfront as cdn with depot, it would require me to make several cdn cloudfront as opposed to one cloudfront with sub folders like (avatar,user_images). I tried doing something along the lines of renaming the file before upload ex:
I'm trying to aim for:
If you don't have this implemented. How do you suggest I do this? Thanks for the help! |
@amol- I'm not entirely sure if this is the proper way to do it with your depot code. But I managed to add a new attribute to the UploadedFileField so it can take in the folder name/ sub directory name for S3. Its more of a quick hack. Would love to know what your thoughts on this are: Now it looks like this:
Thanks! |
@rlam3 UploadedFileField should only contain options that apply to all storage backends, upload_directory might not apply to some backends (like GridFS) so it's better suited to be configured in DEPOT philosophy is that the only thing that identifies a file is a |
@amol- Considering my changes made within rlam3/depot@81d0660. which lines are the ones that are configured outside of the storage? I accidentally closed this case. Could you please reopen for me? Thanks |
@rlam3 I meant that you are currently passing It should definitely not go into DepotFileInfo as there are storages that don't support the concept of directories. |
@amol- Okay thanks I think I understand you now. And now I have a quick question about multiple files. Should I create another model for individual files or is it possible to save multiple files through 1 UploadFileField? |
This was solved by #17 |
How do I configure s3 settings to use with depot? I'm looking for an example.
What should the Depot manager syntax look like?
So far, I've been trying to look at your code and documentation to figure this out but nothing comes up.
Thanks!
The text was updated successfully, but these errors were encountered: