Skip to content
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

Decouple Storage #21

Closed
shaunsephton opened this issue May 2, 2012 · 8 comments

Comments

@shaunsephton
Copy link

commented May 2, 2012

Utilize Django's storage system to allow for wider range of upload storage options, i.e. Amazon S3.

@tomwys

This comment has been minimized.

Copy link
Contributor

commented May 12, 2012

Need it. Are you working on that?

@piotrkilczuk

This comment has been minimized.

Copy link

commented May 31, 2012

I've started working on this and I need your decision.

The thing is, CKEDITOR_UPLOAD_PATH, which is an absolute path to where the files are being uploaded now. It does not reference MEDIA_ROOT, though in most cases, developers will upload to some subdirectory of MEDIA_ROOT anyway. This way, if we upload to S3, we end up with the file being uploaded to full CKEDITOR_UPLOAD_PATH in the bucket.

My suggestion is to make CKEDITOR_UPLOAD_PATH relative to MEDIA_ROOT, but is would not be reverse compatible.

Also this would require cleaning up__init__.py os.path.exists checks, so I'd better ask you first...

@tomwys

This comment has been minimized.

Copy link
Contributor

commented May 31, 2012

If you want to have reverse compatibility in this case you can check if path is absolute, if so print deprected warning and substract MEDIA_ROOT from path.

Pseudocode:

if is_absolute(path):
   print_deprected_warning()
   assert(path.startswith(MEDIA_ROOT)
   return path[len(MEDIA_ROOT):]
else:
  return path
@piotrkilczuk

This comment has been minimized.

Copy link

commented May 31, 2012

Yes Tomek, I like your suggestion, thanks.

@riklaunim

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2012

Hi

I started working on it. Check my fork - https://github.com/riklaunim/django-ckeditor/commits/master

;-)

@czers

This comment has been minimized.

Copy link

commented May 27, 2013

Is there some still some work ongoing with this issue or can we have this one merged in and resolved?

The current way of handling uploads by CKEditor crashes on images with non-ascii filenames like 'ZażółćGęśląJaźń.png'. Allowing some flexibility in storage options would help with issues like this.

@riklaunim

This comment has been minimized.

Copy link
Contributor

commented May 27, 2013

It's rather done since long time ago. I even merged upstream recently - https://github.com/riklaunim/django-ckeditor/commits/master and it seems to work with newer CKEditor (but I didn't tested that much).

@frankwiles

This comment has been minimized.

Copy link

commented Jul 18, 2013

I've been running off the centralniak fork for months without issue FYI since S3 storage was a requirement for a client project. Hasn't failed me yet, I would merge it as it's a pretty major missing feature.

danbruegge pushed a commit to uhuracreativemedia/django-ckeditor that referenced this issue Oct 28, 2013
rgcarrasqueira pushed a commit to rgcarrasqueira/django-ckeditor that referenced this issue Dec 22, 2013
@riklaunim riklaunim closed this Feb 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.