Subversion Repositories SmartDukaan

Rev

Rev 16805 | Rev 16808 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16805 Rev 16806
Line 164... Line 164...
164
            
164
            
165
            
165
            
166
    def on_post(self, request, resp):
166
    def on_post(self, request, resp):
167
        try:
167
        try:
168
            filepath = "/tmp/rejectfile"
168
            filepath = "/tmp/rejectfile"
169
            with open(filepath,'w') as f:
169
            with open(filepath, 'wb') as image_file:
-
 
170
                while True:
170
                f.write(request.stream.read())
171
                    chunk = request.stream.read(4096)
-
 
172
                    if not chunk:
-
 
173
                        break
-
 
174
    
-
 
175
                    image_file.write(chunk)
171
 
176
 
172
            rejectCount = process_rejects(filepath) #this function is not yet implemented
177
            rejectCount = process_rejects(filepath) #this function is not yet implemented
173
            
178
            
174
            resp.body = """
179
            resp.body = """
175
                <html><head><title>Upload Rejects</title></head><body>
180
                <html><head><title>Upload Rejects</title></head><body>