Is possible upload an existing file and automatically create a new revisiĆ³n instead of replace it?.
Thanks.
On an update (PUT) request, or patch request, you can specify the newRevision query parameter to create a new revision.
Related
I am trying to index a document if it doesn't already exist in elasticsearch. I am using BulkProcessor when indexing my documents and using Requests.add action. I will have the exact same id sometimes, does it not add automatically, but update?
P.S. Update is not a requirement, it can stay as is.
P.S.2 I am trying to integrate a user's past tweets into elasticsearch-twitter-river's user stream.
If you index a doc with the same document id then it will do an update. Otherwise it will add a new document.
In other words, if you PUT a doc to {index}/{type}/{id}, then it will always update (overwrite) the document with that id. If you POST a doc to {index}/{type} then in general Elasticsearch will generate a new document for each of your POSTs. That is, unless you mapped a document field to the _id field in mappings.
It seems that the Twitter River uses the PUT method with explicitly specifying the id so tweets with the same id will probably be overwritten.
I am fetching BuiltClass from my built app through SDK and I get list of built file objects in it like e.g: List<BuiltFileObject>
Below listed properties I get from BuiltFileObject:
app_user_object_uid, content_type,file_size,filename, tags[], uid ,url
Now if I upload any file then I get same BuiltFileObject with all properties and I inserted that file object in List<BuiltFileObject> and saved BuiltClass. But in response I don't get list of BuiltFile Objects.
Am I missing anything in save call?
You need to save the upload before your save your BuiltClass. See the documentation for Uploads.
After creating a record in yql's hosted storage using the following:
insert into yql.storage.admin (url) values ("http://hostingdomain.com/mytable.xml")
how can I update that record from a url ?
The documentation only shows:
update yql.storage set value="new value" where name="store://3cc85a99-6a89-4600-ade1-f7f83ecc4b83"
but this requires you to input the value directly instead of fetching it from a url.
For those who might be interested, I found the answer:
update yql.storage set url="[url]" where name="store://[updatename]"
I need to add a new field in contact details with a text area. I tried to edit the files suggested in orange HRM forum.
I am getting an error exception InvalidArgumentException with message
Widget does not exist
As I tried, I can add new field, here the ways:, I'm newbie in symfony :)
This is for Personal Details in PIM
Add name field on schema.yml (field that you wanna create)
Create that field in database (map between field in schema.yml and database)
Use cmd, and run "php symfony doctrine:build-model"
Create the form in (for example) in BaseEmployeeForm.class.php
Create for View in viewPersonalDetailSucces.php
Edit in EmployeeDao.php at function savePersonalDetails
Work perfectly on my side with OrangeHRM 3.1.1,
Add pim module schema
Modify table as schema config
Modify EmployeeDao.php on Widget and Information
Modify viewPersonalDetails form and template.
Done.
I have implemented multiple file uploads for existing records as seen here https://github.com/websymphony/Rails3-Paperclip-Uploadify
I would like to know if it is possible to implement multiple file uploads when creating a new record.
Since we need flash to do the multiple file uploads, how would it be possible to associate the uploaded files with the record if the record has not yet been created.
I have thought of a hack-ish way to essentially make a "draft" and update it. However, I hope there is a better way to do this.
There is no better than the kind of hackish way you present:
creating orphans objects and give them parents later or delete them (sad huh? :) )
creating parent object by default, add some confirmation field in the form so that you know what objects really have an owner, delete the rest.
BTW, you don't "need" flash for multiple uploads, see here: http://blueimp.github.com/jQuery-File-Upload/
Yes, you can use http://blueimp.github.com/jQuery-File-Upload/. But there are still some points you need to be careful.
Don't forget to remove appended array after you define the file field with "multiple". For example: replace "photo[image][]" with "photo[image]".Otherwise file uploaders like "carrierware" will not be working.
If you are using rails 3.2.13, the appended array will always appear no matter whether you set the name to be without appended array. You can use "file_field_tag" to resolve this problem. Please refer this issue to: https://github.com/tors/jquery-fileupload-rails/issues/36.
For the association:
You need to create a hidden text field which contains IDs of images that will be associated to the record you are going to create.
Upload images by "jquery-fileupload"(it is ajax), then get IDs of images from response bodies.
Set these IDs to the hidden field.