Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Error while uploading file in filebrowser
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  20 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
plaban.nayak@gmail.com  
View profile  
 More options Apr 7 2012, 10:12 am
From: "plaban.na...@gmail.com" <plaban.na...@gmail.com>
Date: Sat, 7 Apr 2012 07:12:40 -0700 (PDT)
Local: Sat, Apr 7 2012 10:12 am
Subject: Error while uploading file in filebrowser

When I am uploading a file into the media library . I am getting an
HTTP error.

Any help with that. Is it a permission issue or something


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Bahls (Gmail)  
View profile  
 More options Apr 7 2012, 1:01 pm
From: "Christian Bahls (Gmail)" <christian.ba...@gmail.com>
Date: Sat, 7 Apr 2012 19:01:10 +0200
Local: Sat, Apr 7 2012 1:01 pm
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

had a similar problem, but can also not specify more context
 as it is not really clear where that error came from
 (also not running the server not in developer mode any longer
  but could start an additional to trace that error) [¹]

yours
  Christian

PS: is there a away to do the upload functionality without using a flash
plugin?
http://stackoverflow.com/questions/4750168/fileupload-with-django
http://embrangler.com/2010/08/ajax-uploads-images-in-django/

[¹] just wasn't important enough .. the form file upload works so it is
only an issue for newly created content on pages

On Sat, Apr 7, 2012 at 4:12 PM, plaban.na...@gmail.com <

plaban.na...@gmail.com> wrote:

> When I am uploading a file into the media library . I am getting an
> HTTP error.

> Any help with that. Is it a permission issue or something

--
I moved away from Google Mail - please use my qb352.de email address
see http://bit.ly/y4vCXB, http://bit.ly/y9invu, http://bit.ly/xyA9vk
and http://bit.ly/AmIiIm

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josh Cartmell  
View profile  
 More options Apr 7 2012, 8:00 pm
From: Josh Cartmell <joshcar...@gmail.com>
Date: Sat, 7 Apr 2012 17:00:53 -0700
Local: Sat, Apr 7 2012 8:00 pm
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

Is it on all uploads or just uploads of a certain size?  I had a site that
was using fastcgi that would crash on uploads above a certain size because
of a fastcgi timeout setting.

On Sat, Apr 7, 2012 at 10:01 AM, Christian Bahls (Gmail) <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen McDonald  
View profile  
 More options Apr 7 2012, 11:17 pm
From: Stephen McDonald <st...@jupo.org>
Date: Sun, 8 Apr 2012 13:17:02 +1000
Local: Sat, Apr 7 2012 11:17 pm
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

Have you used your browser's developer tools for viewing JavaScript errors
or failed HTTP requests?

Are you able to upload the file to the demo site? If not, then great, we
can replicate it - can you then make the file available somewhere for
others to troubleshoot?

Not much anyone can do otherwise without any info to work with.

On Sun, Apr 8, 2012 at 12:12 AM, plaban.na...@gmail.com <

plaban.na...@gmail.com> wrote:

> When I am uploading a file into the media library . I am getting an
> HTTP error.

> Any help with that. Is it a permission issue or something

--
Stephen McDonald
http://jupo.org

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
plaban nayak  
View profile  
 More options Apr 8 2012, 1:59 am
From: plaban nayak <plaban.na...@gmail.com>
Date: Sun, 8 Apr 2012 11:29:47 +0530
Local: Sun, Apr 8 2012 1:59 am
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

Hi,

when I am visiting the site
http://mezzanine.jupo.org/admin/media-library/browse/ * *I am getting an
UnicodeDecodeError.

In my system nginx log the post request to
/admin/media_library/upload_file/ shows 403 status and the flash player is
Shock wave flash.

In the admin panel after the file is uploaded it shows HTTP Error and then
redirects back to the library.
Is there a way i can see what is the error happening.

It happens with files of every size, small and large.

Plaban


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen McDonald  
View profile  
 More options Apr 8 2012, 2:14 am
From: Stephen McDonald <st...@jupo.org>
Date: Sun, 8 Apr 2012 16:14:19 +1000
Local: Sun, Apr 8 2012 2:14 am
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

Thanks Plaban - I think you'll find the uploads directory
(project/static/media/uploads/ by default) isn't writeable by the web
server user.

The demo site should also work again now.

--
Stephen McDonald
http://jupo.org

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
plaban nayak  
View profile  
 More options Apr 8 2012, 2:23 am
From: plaban nayak <plaban.na...@gmail.com>
Date: Sun, 8 Apr 2012 11:53:07 +0530
Local: Sun, Apr 8 2012 2:23 am
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

Hi

What should I do on my system?

Plaban


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
plaban nayak  
View profile  
 More options Apr 8 2012, 2:42 am
From: plaban nayak <plaban.na...@gmail.com>
Date: Sun, 8 Apr 2012 12:12:00 +0530
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

Ok got it .

On Sun, Apr 8, 2012 at 11:53 AM, plaban nayak <plaban.na...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
plaban nayak  
View profile  
 More options Apr 8 2012, 2:55 am
From: plaban nayak <plaban.na...@gmail.com>
Date: Sun, 8 Apr 2012 12:25:34 +0530
Local: Sun, Apr 8 2012 2:55 am
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

I made the home directory and all of its subdirectory   writeable by
everyone but still i am getting the same error.

Plaban

On Sun, Apr 8, 2012 at 12:12 PM, plaban nayak <plaban.na...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen McDonald  
View profile  
 More options Apr 8 2012, 3:19 am
From: Stephen McDonald <st...@jupo.org>
Date: Sun, 8 Apr 2012 17:19:18 +1000
Local: Sun, Apr 8 2012 3:19 am
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

Have you tried running everything without a web server, using Django's
built-in development server?

At least that way you can isolate whether it's a web server issue.

--
Stephen McDonald
http://jupo.org

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen McDonald  
View profile  
 More options Sep 23 2012, 5:21 pm
From: Stephen McDonald <st...@jupo.org>
Date: Mon, 24 Sep 2012 07:21:19 +1000
Local: Sun, Sep 23 2012 5:21 pm
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

I can't reproduce this, but I can point you to what's going wrong.

- The upload view/template passes the current user's session key as a
variable when uploading a file via the Flash widget
- The Flash widget posts to the _upload_file view which is wrapped in a
flash_login_required decorator
- The flash_login_required decorator checks for the session key, and looks
up the user based on session key, which is where the error occurs for you

So something's getting lost in that chain, here are the relevant bits of
code:

Session key gets passed to the upload view for using in JS:
https://github.com/stephenmcd/filebrowser-safe/blob/master/filebrowse...
Session key gets set in JS for the Flash widget in the upload template:
https://github.com/stephenmcd/filebrowser-safe/blob/master/filebrowse...
Actual upload view that the file is posted to is wrapped in the
flash_login_required decorator:
https://github.com/stephenmcd/filebrowser-safe/blob/master/filebrowse...
User lookup in the decorator where the error seems to occur:
https://github.com/stephenmcd/filebrowser-safe/blob/master/filebrowse...

--
Stephen McDonald
http://jupo.org

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Henri Colas  
View profile  
 More options Sep 23 2012, 5:30 pm
From: Henri Colas <henrico...@gmail.com>
Date: Sun, 23 Sep 2012 23:28:53 +0200
Local: Sun, Sep 23 2012 5:28 pm
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

Thanks for the fast answer !
I'll look into it in the next few days, especially the influence of the
settings I changed, and report to you if I find something interesting.

Henri


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Henri Colas  
View profile  
 More options Sep 29 2012, 4:12 am
From: Henri Colas <henrico...@gmail.com>
Date: Sat, 29 Sep 2012 10:12:07 +0200
Local: Sat, Sep 29 2012 4:12 am
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

OK, I found what's wrong, and a possible fix:

*TL;DR* : upload over https doesn't work due to bad redirections, fix is
add another prefix to SSL_FORCE_URL_PREFIXES .

----------
With the settings:
+SSL_ENABLED = True
-#SSL_ENABLED = True

+SSL_FORCE_URL_PREFIXES = ("/admin", "/account")
-#SSL_FORCE_URL_PREFIXES = ("/admin", "/account")

     # Uncomment the following if using any of the SSL settings:
+    "mezzanine.core.middleware.SSLRedirectMiddleware",
-    #"mezzanine.core.middleware.SSLRedirectMiddleware",

After investigation, the chain of events is:
GET '
https://mydomain/asset_proxy/?u=/static/filebrowser/uploadify/uploadi...
=> 302 to same url in HTTP
GET '
http://mydomain/asset_proxy/?u=/static/filebrowser/uploadify/uploadif...
POST http://mydomain/admin/media-library/upload_file/ => 302 to same url in
HTTPS
GET https://mydomain/admin/media-library/upload_file/ => error 500 (the one
I initially mentionned)

Fix:
If I add "/asset_proxy" to SSL_FORCE_URL_PREFIXES, upload works correctly
in https.
But I have no idea of possible consequences !

Henri


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Henri Colas  
View profile  
 More options Sep 30 2012, 4:19 pm
From: Henri Colas <henrico...@gmail.com>
Date: Sun, 30 Sep 2012 22:18:32 +0200
Local: Sun, Sep 30 2012 4:18 pm
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

Well, it appears that "/asset_proxy" shouldn't always be in HTTPS, so I am
reverting to another config:

SSL_FORCE_URL_PREFIXES = ("/account",)

Henri


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen McDonald  
View profile  
 More options Sep 30 2012, 9:32 pm
From: Stephen McDonald <st...@jupo.org>
Date: Mon, 1 Oct 2012 11:31:43 +1000
Local: Sun, Sep 30 2012 9:31 pm
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

I suspect that it should use the same protocol as whatever the admin is
using.

I was thinking that this is definitely an issue and that there should be
some handling (not sure where) that says if SSL is configured, and the
admin is forced to use it, then the asset_proxy URL should also do the same.

But now you're saying that's not the case?

--
Stephen McDonald
http://jupo.org

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Henri Colas  
View profile  
 More options Oct 1 2012, 5:06 pm
From: Henri Colas <henrico...@gmail.com>
Date: Mon, 1 Oct 2012 23:06:02 +0200
Local: Mon, Oct 1 2012 5:06 pm
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

On Mon, Oct 1, 2012 at 3:31 AM, Stephen McDonald <st...@jupo.org> wrote:
> I suspect that it should use the same protocol as whatever the admin is
> using.

That's what I think too, but asset_proxy is used in other places, for
instance when editing the content of an article *directly from the site*,
not from the admin, it calls the url
http://mydomain/asset_proxy/?u=http://mydomain/static/grappelli/tinym...
html editing.

If asset_proxy is set to be redirected to https, this request gets a 302
response, and the redirection gives a 200 response without any content  =>
the html source editor no longer works..

Same thing for direct image import/editing with the url
http://mydomain/asset_proxy/?u=http://mydomain/static/grappelli/tinym...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen McDonald  
View profile  
 More options Oct 1 2012, 5:08 pm
From: Stephen McDonald <st...@jupo.org>
Date: Tue, 2 Oct 2012 07:08:23 +1000
Local: Mon, Oct 1 2012 5:08 pm
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

Good point.

So the correct fix might be to exclude asset_proxy entirely from any
redirects within the SSL middleware, allowing it to run on whatever
protocol is being used in the page that references it.

Does that sound right?

--
Stephen McDonald
http://jupo.org

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josh Cartmell  
View profile  
 More options Oct 1 2012, 6:35 pm
From: Josh Cartmell <joshcar...@gmail.com>
Date: Mon, 1 Oct 2012 15:35:37 -0700
Local: Mon, Oct 1 2012 6:35 pm
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

That makes sense to me.  Awhile back (when ssl handling was still in
cartridge) I updated the ssl middleware to look at an additional setting.
URL prefixes in that setting would be served over whatever protocol they
were requested on.  Those changes are here:
https://bitbucket.org/joshcartme/cartridge_https-by-url-prefix/change...

That change didn't make it into cartridge, but would something like this
make sense at this point?  That way if anything else comes up that should
be accessible over either protocol it would be as easy as updating a
setting.  It could also give users the power to create urls in their own
projects that would be accessible over either protocol.

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Stephen McDonald  
View profile  
 More options Oct 1 2012, 8:48 pm
From: Stephen McDonald <st...@jupo.org>
Date: Tue, 2 Oct 2012 10:48:17 +1000
Local: Mon, Oct 1 2012 8:48 pm
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

Kinda related - yesterday I added a new setting that allows you to disable
redirecting back to HTTP when URLs that aren't marked as requiring SSL are
accessed over SSL:

https://github.com/stephenmcd/mezzanine/commit/ae111f629a1000e33680d6...

Seems like that might cover the same scenario.

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
zgohr  
View profile  
 More options Oct 7 2012, 11:31 am
From: zgohr <zachary.g...@gmail.com>
Date: Sun, 7 Oct 2012 08:31:22 -0700 (PDT)
Local: Sun, Oct 7 2012 11:31 am
Subject: Re: [mezzanine-users] Error while uploading file in filebrowser

Just adding this here if someone stumbles upon this thread in the future.
File uploads do work over SSL, they just require a valid SSL certificate
which can be garnered for free from http://www.startssl.com/

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »