files.rb revision 89849d4f0871f414f3d7d8e926bb10e9db19fd57
1df6105803c4c56c020a56301c7c9c4890fd4158mathog # virtual attribute for upload
1df6105803c4c56c020a56301c7c9c4890fd4158mathog return true if ontology.parent
1df6105803c4c56c020a56301c7c9c4890fd4158mathog ontology.path = @raw_file.original_filename if ontology.path.nil?
1df6105803c4c56c020a56301c7c9c4890fd4158mathog # otherwise the file upload is broken (no implicit conversion of ActionDispatch::Http::UploadedFile into String):
1df6105803c4c56c020a56301c7c9c4890fd4158mathog tmp_file = if @raw_file.class == ActionDispatch::Http::UploadedFile
1df6105803c4c56c020a56301c7c9c4890fd4158mathog repository.save_file(tmp_file, ontology.path, "message", user)
8bda3b4c9722b7481a9ed97a4f5c946a5b6797acmathog # path to the raw file
1df6105803c4c56c020a56301c7c9c4890fd4158mathog # path to the raw file, checks out the raw file if is missing
1df6105803c4c56c020a56301c7c9c4890fd4158mathog # path to xml file (hets output)
1df6105803c4c56c020a56301c7c9c4890fd4158mathog # checks out the raw file
1df6105803c4c56c020a56301c7c9c4890fd4158mathog # returns the raw data directly from the repository