I'm using Carrierwave to upload an XML file. The XML is uploaded, and looks OK but is not being read
I'm not sure if this is a problem with Carrierwave, or if I'm doing something wrong. But my origin开发者_Python百科al file which is able to be read by my parser looks like:
-rw-r--r--@ 1 jeremysmith staff 249444 Oct 9 12:03 small.xml
and the file as it is uploaded, which will not be parsed:
-rw-r--r-- 1 jeremysmith staff 249444 Oct 9 13:17 public/uploads/small.xml
What is the ambersand, is it a factor here?
The 'at symbol' (@) at the end of permissions in OSX indicates that the file has some OSX specific extended attributes associated with it. If you're curious, you can display the extended attributes by adding the -@
option to the ls
command, like so:
$ ls -l@
These extended attributes shouldn't affect the ability for your app to parse the uploaded XML.
If you're trying to parse the file as part of your controller or model architecture and not in a carrierwave callback then you may be trying to parse the file before it's available. If you could post your uploader, or some more info - we might be able to point you to your issue.
精彩评论