Re: [pylons-discuss] Cornice / Colander design for file upload

2021-02-11 Thread Thierry Florac
Hi Steve, My message is probably wrong! As far as I can remember, the miss was not in Colander documentation, but in Cornice Swagger extension documentation about types converters registration; an issue is already open to add this to it's documentation... Best regards, Thierry -- https://www.u

Re: [pylons-discuss] Cornice / Colander design for file upload

2021-02-09 Thread Steve Piercy
On 2/9/21 12:56 AM, Thierry Florac wrote: > I found that Colander is probably lacking a few documentation about creating > and registering custom types and converters I'd like to improve the docs. Would you please open an issue with what you think is missing from this section? https://docs.pyl

Re: [pylons-discuss] Cornice / Colander design for file upload

2021-02-09 Thread Thierry Florac
SON is the least desirable but it really depends > on the situation - I'm definitely guilty of using it in certain scenarios > (if you just really really really want a JSON body cuz that's what's > easiest on the client-side). > > It's worth noting that Deform

Re: [pylons-discuss] Cornice / Colander design for file upload

2021-02-08 Thread Michael Merickel
that's what's easiest on the client-side). It's worth noting that Deform has its own mechanism for storing the file upload on the server such that you can connect it up to the form data from a separate request. This is handy to avoid re-transferring the data when parts of the form

[pylons-discuss] Cornice / Colander design for file upload

2021-02-07 Thread Thierry Florac
in a REST API using this encoding? Should I prefer something like JSON with base64 string encoding (including for use cases with large data files)?? - how should I handle schema verification with Colander for file upload fields (what I actually receive using form-data encoding is a CGI FieldStorag

Re: [pylons-discuss] API file upload

2018-04-19 Thread Jonathan Vanasco
On Wednesday, April 18, 2018 at 4:54:41 PM UTC-4, Bert JW Regeer wrote: > > Using request.body_file is actually better than using body_file_raw. The > raw reads directly from the underlying wsgi.input, which means if you are > using wsgiref or some other server that doesn't correctly input termi

Re: [pylons-discuss] API file upload

2018-04-18 Thread Bert JW Regeer
request.body_file will protect you against bad WSGI servers/clients not sending appropriate headers. It'll return you something that you can read from, even if it is 0 bytes. It will also not let you read past the end of the input. request.body_file_seekable will return the same thing as request

Re: [pylons-discuss] API file upload

2018-04-18 Thread Bert JW Regeer
Using request.body_file is actually better than using body_file_raw. The raw reads directly from the underlying wsgi.input, which means if you are using wsgiref or some other server that doesn't correctly input terminate wsgi.input you may potentially deadlock reading forever because the wsgi.in

[pylons-discuss] Re: API file upload

2018-04-18 Thread Jonathan Vanasco
I was confused on this years ago. The problem is in naming... `curl` is concerned with the HTTP method `POST`. Let's call that `HTTP POST`. If you look at the `curl` documents for the difference on the various `--data-` options. Those options will `HTTP POST` data in different formats an

[pylons-discuss] Re: API file upload

2018-04-17 Thread Zsolt Ero
OK, I'm getting there, althought I'm still confused a bit. In WebOb docs I found request.body_file, request.body_file_raw, request.body_file_seekable. In multipart's request.POST, I'm doing: file_obj.seek(0, 2) file_size = file_obj.tell() file_obj.seek(0) Should I be using seekable or raw for th

[pylons-discuss] Re: API file upload

2018-04-17 Thread Zsolt Ero
I've realised the following: 1. If I don't specify Content-Type, curl defaults to x-www-form-urlencoded 2. What I thought is the binary file's contents as a string is actually not working reliably. On an XML upload of a single file I get thousands of items and request.POST.items() looks like: [' wr

[pylons-discuss] API file upload

2018-04-17 Thread Zsolt Ero
Hi, I'm trying to implement an API to a website which didn't have an API yet. It's purpose will be to allow file uploads from 3rd party native apps. I'd like to implement the API like Dropbox v2 API, just as a good reference for API design. It's upload endpoint has the following specs: https://w

Re: simplest possible background process for file upload

2013-04-12 Thread Jonathan Vanasco
off the top of my head: 1. celery 2. fork a process to handle the uploads 3. register a cleanup handler 4. homegrown batch / daemon -- log the upload locally, then process the upload separately in my personal experience -- the main thing i'd watch out for is the book-keeping/accounting portion o

Re: simplest possible background process for file upload

2013-04-12 Thread Whit Morriss
On Apr 12, 2013, at 4:06 AM, uday mailto:gotou...@gmail.com>> wrote: I have a pyramid app which handles file upload. I am able to upload that file to amazon s3 as soon as user uploads the file without saving it anywhere on the file system. The problem here is, it is taking more tim

simplest possible background process for file upload

2013-04-12 Thread uday
I have a pyramid app which handles file upload. I am able to upload that file to amazon s3 as soon as user uploads the file without saving it anywhere on the file system. The problem here is, it is taking more time than just storing file locally. I just want a simple task to upload the file

Re: File Upload

2011-06-16 Thread Chris McDonough
On Thu, 2011-06-16 at 10:54 -0700, Jason wrote: > It was a problem with my form (being submitted by jquery) For the record, here's a short tutorial describing file uploads and Pyramid: http://docs.pylonsproject.org/projects/pyramid_cookbook/dev/files.html -- You received this message because y

Re: File Upload

2011-06-16 Thread Jason
It was a problem with my form (being submitted by jquery) -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/1bEbkNjqa88J. To post to this group, send emai

File Upload

2011-06-16 Thread Jason
How are file uploads done in Pyramid? I have tried to access the file from request.POST['fileupload'] and request.params['fileupload'] using this html form: I have tried printing out all the keys in the request, but I cannot find the file anywhere. Thanks, Jason -- You received this m

Re: Handle file upload with Deform + SqlAlchemy in Pyramid

2011-05-29 Thread keesjan
k. > > I try to create a file upload form to store small binary (audio) files > in a DB. > > I use Deform for my form which contains a FileUploadWidget. Great. But > after this I hit a brick wall. How to pass the data from Deform > filedict into a SqlAlchemy LargeBinary? >

Handle file upload with Deform + SqlAlchemy in Pyramid

2011-05-29 Thread keesjan
Possibly a newbie question (which I am), but I'm stuck. I try to create a file upload form to store small binary (audio) files in a DB. I use Deform for my form which contains a FileUploadWidget. Great. But after this I hit a brick wall. How to pass the data from Deform filedict i

Re: Big file upload & progress bar

2010-02-01 Thread Vladimir Dronnikov
>> >> Try upgrading Pylons to development version, Enrico. >> > > I've modified a lot of files to reflect your changes, but in your site > you say that > "gp.fileupload can be used without modifying your application" > So I want to start again with a fresh paster project,  what is the > minimum con

Re: Big file upload & progress bar

2010-02-01 Thread morellik
> > Try upgrading Pylons to development version, Enrico. > I've modified a lot of files to reflect your changes, but in your site you say that "gp.fileupload can be used without modifying your application" So I want to start again with a fresh paster project, what is the minimum configuration to

Re: Big file upload & progress bar

2010-01-29 Thread Vladimir Dronnikov
> >> How do I append gp.fileupload to an existing Shabti >> (shabti_formalchemy) application? In particular, how to attach the >> middleware? > Thanks a lot, Graham! > > [pipeline:main] > pipeline = fileupload {{package}} > > [filter:fileupload] > [app:{{package}}] > use = egg:{{package}} Thos

Re: Big file upload & progress bar

2010-01-29 Thread Graham Higgins
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 29 Jan 2010, at 21:41, Vladimir Dronnikov wrote: How do I append gp.fileupload to an existing Shabti (shabti_formalchemy) application? In particular, how to attach the middleware? Using the standard tempita substitution pattern, replace {{pac

Re: Big file upload & progress bar

2010-01-29 Thread Vladimir Dronnikov
How do I append gp.fileupload to an existing Shabti (shabti_formalchemy) application? In particular, how to attach the middleware? TIA, -- Vladimir -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-di

Re: Big file upload & progress bar

2010-01-29 Thread Vladimir Dronnikov
> . >  File "/home/morelli/PYTHON/INTERNAL_PROGRAMS/samplepylons/ > samplepylons/config/middleware.py", line 37, in make_app >    config = load_environment(global_conf, app_conf) >  File "/home/morelli/PYTHON/INTERNAL_PROGRAMS/samplepylons/ > samplepylons/config/environment.py", line 26, in load_en

Re: Big file upload & progress bar

2010-01-28 Thread morellik
> Haha, you're right. I've upgraded my FF to 3.6 (OSX) and got the same crash. > I've also tried without the JS stuff. FF freeze and style freezing > even if the upload is complete. > Don't know what to do. But I don't want to spend time on this buggy > version, sorry. Ok, but which is the minim

Re: Big file upload & progress bar

2010-01-28 Thread Gael Pasgrimaud
On Thu, Jan 28, 2010 at 12:58 PM, morellik wrote: > >> hm... don't know. What append if you try a 600Mb upload with a standard form >> ? > > I didn't tried. > >> >> You can try to turn the log level of the root logger to DEBUG to get >> more info in the pylons console and use firebug to log ajax

Re: Big file upload & progress bar

2010-01-28 Thread morellik
> hm... don't know. What append if you try a 600Mb upload with a standard form ? I didn't tried. > > You can try to turn the log level of the root logger to DEBUG to get > more info in the pylons console and use firebug to log ajax calls in > firefox > I've just try the sampleapp with a 300Mb fi

Re: Big file upload & progress bar

2010-01-28 Thread Gael Pasgrimaud
On Thu, Jan 28, 2010 at 11:07 AM, morellik wrote: > >> Look like I've forget to sync the repo from bitbucket. >> >> Latest log entry is now "upgrade sample pylons to >> 0.9.7"http://www.gawel.org/docs/gp.fileupload/rev/53aa46a39a7e >> >> So it should work. >> > > Thanks seems to work. > But, when

Re: Big file upload & progress bar

2010-01-28 Thread morellik
> Look like I've forget to sync the repo from bitbucket. > > Latest log entry is now "upgrade sample pylons to > 0.9.7"http://www.gawel.org/docs/gp.fileupload/rev/53aa46a39a7e > > So it should work. > Thanks seems to work. But, when I try to upload a file (around 1/2 MB) the progress bar doesn't

Re: Big file upload & progress bar

2010-01-28 Thread Gael Pasgrimaud
On Thu, Jan 28, 2010 at 5:47 AM, Graham Higgins wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > On 27 Jan 2010, at 20:24, Graham Higgins wrote: > >> Okay, dokey, I'll give it a spin and confirm back that it does. > > > Yes, it does. > > I needed to make one or two simple changes and

Re: Big file upload & progress bar

2010-01-27 Thread Graham Higgins
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 27 Jan 2010, at 20:24, Graham Higgins wrote: Okay, dokey, I'll give it a spin and confirm back that it does. Yes, it does. I needed to make one or two simple changes and I've updated the bitbucket repos: http://bitbucket.org/gawel/gpfile

Re: Big file upload & progress bar

2010-01-27 Thread Graham Higgins
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 27 Jan 2010, at 20:24, Graham Higgins wrote: Latest log entry is now "upgrade sample pylons to 0.9.7" http://www.gawel.org/docs/gp.fileupload/rev/53aa46a39a7e So it should work. Okay, dokey, I'll give it a spin and confirm back that it does.

Re: Big file upload & progress bar

2010-01-27 Thread Graham Higgins
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 27 Jan 2010, at 18:56, Gael Pasgrimaud wrote: Latest log entry is now "upgrade sample pylons to 0.9.7" http://www.gawel.org/docs/gp.fileupload/rev/53aa46a39a7e So it should work. Okay, dokey, I'll give it a spin and confirm back that it does

Re: Big file upload & progress bar

2010-01-27 Thread Gael Pasgrimaud
On Wed, Jan 27, 2010 at 5:04 PM, morellik wrote: > > > On Jan 27, 4:39 pm, Gael Pasgrimaud wrote: >> Hi, >> >> On Wed, Jan 27, 2010 at 4:15 PM, morellik wrote: >> > Dear all, >> >> > I'm writing a pylons application to permit to our users to upload very >> > big files (hundred of MB). During upl

Re: Big file upload & progress bar

2010-01-27 Thread morellik
On Jan 27, 4:39 pm, Gael Pasgrimaud wrote: > Hi, > > On Wed, Jan 27, 2010 at 4:15 PM, morellik wrote: > > Dear all, > > > I'm writing a pylons application to permit to our users to upload very > > big files (hundred of MB). During upload I would display a progress > > bar to check the uploading

Re: Big file upload & progress bar

2010-01-27 Thread Gael Pasgrimaud
Hi, On Wed, Jan 27, 2010 at 4:15 PM, morellik wrote: > Dear all, > > I'm writing a pylons application to permit to our users to upload very > big files (hundred of MB). During upload I would display a progress > bar to check the uploading status. > > I'm searching for some tools to help me. I fin

Big file upload & progress bar

2010-01-27 Thread morellik
Dear all, I'm writing a pylons application to permit to our users to upload very big files (hundred of MB). During upload I would display a progress bar to check the uploading status. I'm searching for some tools to help me. I find gp.fileupload but I really don't understand how to use in Pylons.

Re: pylons 0.9.7 and file upload progress bar

2009-02-21 Thread snorkel
On Feb 21, 10:00 am, snorkel wrote: > I was using gp.fileupload with good results in 0.9.6, when I upgraded > to the latest release > it stopped working as it did in 0.9.6.  It seems to try to do > operation per file in the multipart request instead > of one operation for all the files uploade

pylons 0.9.7 and file upload progress bar

2009-02-21 Thread snorkel
Hi, I was using gp.fileupload with good results in 0.9.6, when I upgraded to the latest release it stopped working as it did in 0.9.6. It seems to try to do operation per file in the multipart request instead of one operation for all the files uploaded. Is anyone doing a upload progress bar with

Re: reconstruction session after a Flash-based file upload

2008-06-27 Thread k7lim
You're right. The string that's being passed along is not the real sessionID. I'm relying on swfupload to put the sessionID into the form. The swfupload plugin that I'm using says that it "automatically collects the cookies from the browser and adds them to the post_params." Passing in the se

Re: reconstruction session after a Flash-based file upload

2008-06-27 Thread Ben Bangert
On Jun 27, 2008, at 1:42 PM, k7lim wrote: I'm starting to get the hang of this. However, I'm getting None back for my get_by_id(sessionID) call. My hunch is that the reason is something else you stated: I'm not actually passing the sessionID, as I'd assumed. I'm passing a long hex string (len

Re: reconstruction session after a Flash-based file upload

2008-06-27 Thread k7lim
Hey Ben, I'm starting to get the hang of this. However, I'm getting None back for my get_by_id(sessionID) call. My hunch is that the reason is something else you stated: I'm not actually passing the sessionID, as I'd assumed. I'm passing a long hex string (len is 72). Perhaps this is the hash

Re: reconstruction session after a Flash-based file upload

2008-06-27 Thread Ben Bangert
On Jun 27, 2008, at 10:14 AM, k7lim wrote: Thanks for the quick reply, Ben. Once I have that oldsession, how do I "install" it as the current one that the system can act on? You need to register it as the object that should be used as pylons.session like so: import pylons # Get the new se

Re: reconstruction session after a Flash-based file upload

2008-06-27 Thread k7lim
Thanks for the quick reply, Ben. Once I have that oldsession, how do I "install" it as the current one that the system can act on? On Jun 27, 12:56 pm, Ben Bangert <[EMAIL PROTECTED]> wrote: > On Jun 27, 2008, at 9:03 AM, k7lim wrote: > > > However, I've poked around endlessly at Pylons/Beaker

Re: reconstruction session after a Flash-based file upload

2008-06-27 Thread Ben Bangert
On Jun 27, 2008, at 9:03 AM, k7lim wrote: However, I've poked around endlessly at Pylons/Beaker docs (not much there), and I can't figure out how to "resume" my session, given a POST variable that has the right sessionID in it. You can get a session object back corresponding to the sessionID w

reconstruction session after a Flash-based file upload

2008-06-27 Thread k7lim
Hey Guys, Thanks for some great previous threads, this is a good resource. I'm using SWFUpload to allow a user to submit a file. However, SWFUpload comes back with a 302 error: The "user" (flash) isn't logged in, so isn't allowed to post the file. SWFUpload has a helper function that can help

Re: connection reset on file upload

2007-10-22 Thread Clemens Hermann
Finally I found the source of the problem. In case of a file upload the responsible controller is called immediately, even before the file is completely uploaded. The execution of the controller instructions is stalled until the file is uploaded completely if - request.POST['data_file

Re: connection reset on file upload

2007-10-15 Thread Clemens Hermann
Ken, thanks for your sample. > def upload(self, environ): > myfile = request.POST['myfile'] > fileName = myfile.filename > myfile.file.close() What happens if you do not use the provided data? It should be technically possible to ignore the user supplied data completely. So the appl

Re: connection reset on file upload

2007-10-12 Thread Garland, Ken R
My apologies, I didn't pay close attention to your issue. I have my files stored outside of the project directory but I've pasted the relevant parts that may help.. Just as example this is part of my uploading controller: def upload(self, environ): myfile = request.POST['myfile'] fileNam

Re: connection reset on file upload

2007-10-12 Thread Clemens Hermann
Ken, thanks for your reply. > I would recommend using fileapp to handle file uploads. If I got the docs right, fileapp is intended to support sending file content from the server to the browser. My problem is related to the other direction (a user uploads a client-local file to the server via t

Re: connection reset on file upload

2007-10-12 Thread Garland, Ken R
as I remove the line "data_file = > request.POST['data_file']" I get > - "The connection was reset(Mozilla)" > - "The page cannot be displayed (IE)" > > The problem only occurs If I try to upload a File with several > megabytes in size. Smaller

connection reset on file upload

2007-10-12 Thread Clemens Hermann
File with several megabytes in size. Smaller files work out. Also if I do not select a file for file upload, no error occurs. Anyway, as soon as I access uploaded files in the controller, also large files work fine. There is nothing reported in the

Seeking help to convert a file upload progress indicator to be easily used in Pylons

2007-07-19 Thread Fr0de
Hi all, I was looking for a nice way to display a progress bar or some indication that a file in being transferred, and came across this one: http://development.finetooth.com/?p=11 It seems to rely on PHP, so I now want to convert it to fit into Pylons easily. I have set up a project for this o

Re: File upload corrupting image

2006-10-31 Thread [EMAIL PROTECTED]
G. Windows! That was it, need to open with wb. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe

Re: File upload corrupting image

2006-10-30 Thread Shannon -jj Behrens
On 10/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have a form that I'm using to upload a file. All seems to be in > order, but when I look at the newly copied file it's all skewed and the > colors are all wierd. > > Here is the code I'm using

File upload corrupting image

2006-10-30 Thread [EMAIL PROTECTED]
I have a form that I'm using to upload a file. All seems to be in order, but when I look at the newly copied file it's all skewed and the colors are all wierd. Here is the code I'm using to handle the file upload, Any ideas? : if 'big_image' in request.params:

Re: Formencode file upload validation

2006-09-27 Thread Jamie Wilkinson
This one time, at band camp, Daniel Lyons wrote: >This one's biting me also. I fixed it for the mean time by making a >copy of FileUploadKeeper and changing these lines: I forgot about this message :) I made my own validator, to use instead of FileUploadKeeper: class FileUploadValidator(validat

Re: Formencode file upload validation

2006-09-22 Thread Daniel Lyons
Jamie, This one's biting me also. I fixed it for the mean time by making a copy of FileUploadKeeper and changing these lines: def _to_python(self, value, state): upload = value.get(self.upload_key) static = value.get(self.static_key, '').strip() into this: def _to_python(self, valu

Re: Formencode file upload validation

2006-08-29 Thread Jamie Wilkinson
o resubmit the content it'll give you a >hidden field that can take the place of re-uploading the file. Anyway, >it's meant to be used in a situation where you have a complex form and >an image upload in that form. Ok. I've got a bug where I try to validate a form with a

Re: Formencode file upload validation

2006-08-15 Thread Ian Bicking
Jamie Wilkinson wrote: > Hey, > > Does anyone have an example of using FormEncode's > FieldStorageUploadConverter or FileUploadKeepr ? There's no example in the > docstrings and I'm just having a hard time applying them in the same way as > any of the other validators. I've used them from times

Formencode file upload validation

2006-08-13 Thread Jamie Wilkinson
Hey, Does anyone have an example of using FormEncode's FieldStorageUploadConverter or FileUploadKeepr ? There's no example in the docstrings and I'm just having a hard time applying them in the same way as any of the other validators. --~--~-~--~~~---~--~~ You re