Hi,
Why not try use JavaScript file open to process the Information in client.
It'a a waste of bandwith in client + server side if upload not needed.
Regards,
Mulianto
Http://muliantophang.blogspot.com
Sent from my iPhone
On 11 Agt 2013, at 18:02, Bob Aalsma
Hi Tom,
OK, thanks.
The file I'd want to read is a parameter file which contains user specific
information. I just need to know the data to guide the actions, no need to
store or keep it.
So I'll just accept the upload, extract the data and then delete the upload.
Oh well ;)
Regards,
Bob
--
Hi Bob
> I'm trying to achieve the following:
>
>- user indicates a file on his/her machine
>- the program opens the file, reads the data and acts on that
>
>
>
What you want to do is not possible - at least not without client-side
scripting.
The "program" you refer to is running on
Thanks Nigel.
OK, at least this has stopped me running around in circles and I can continue
from here.
I would think you can do stuff client side, but this is probably more Python
and less Django - to be solved in future releases ;)
Regards,
Bob
Op 11 aug. 2013, om 00:10 heeft Nigel Legg
The file is uploaded - ie it is copied onto the server drive.
I don't think you can do stuff client side with Django - beyond my
knowledge.
Regards,
Nigel Legg
07914 740972
http://www.trevanianlegg.co.uk
http://twitter.com/nigellegg
http://uk.linkedin.com/in/nigellegg
On 10 August 2013 18:04,
Thanks Nigel, this looks very promising ;)
If I interpret your text correctly, this is based on the upload/save
example I mentioned.
I'm really interested in the meaning of parts your closing paragraph:
- "This saves the file in 'media/documents/2013/08/10/datafile.csv'." -
I think this
I've based my process a minimal file upload - I think based on the answer
to the link above. I use:
models.py:
class Document(models.Model):
docfile = models.FileField(upload_to='documents/%Y/%m/%d')
views.py:
def list(request):
# Handle file uploadf
if request.method == 'POST':
Hi,
I'm trying to achieve the following:
- user indicates a file on his/her machine
- the program opens the file, reads the data and acts on that
So far, I can find examples of indicating the file on the user's machine,
but this is always combined with saving to database (which I don't
8 matches
Mail list logo