I want to get the UniqueId of my files in one drive. If you select a file and then download it, the download link contains the unique id. Additionally, if you share one of your word, powerpoint, excel and similar files with only specific people, the sharable link contains the uinque id but not for other files like photos and videos for which only the path of the file is seen in the link.
Is there anyway to get the unique id for photos and videos like it could be gotten for word and excel files? Is there any API that allows me to do so?
Thanks for answeiring.
Try this:
https://graph.microsoft.com/v1.0/me/drive/items/<Item ID>/children?$select=id,name
Result:
I have 3 files under a folder, so this is my request and result:
If you are not sure about your folder item id, use the request below to get all item id under root:
https://graph.microsoft.com/v1.0/me/drive/items/root/children?$select=id,name
Result:
More about this, see here.
Related
Is there any way to traverse through the image file that belongs to content asset folder?
For Instance:
https://loca.abc.com/contentassets/90a388f260a04f54b4056becc1c58307/lorem-ipsum-alternatives.png
If I have to locate this file in episerver media tab, how can i achieve this?
It is easy to locate files under global assets & site assets from "For all Site" & "For this site" container under Media tab but I cannot locate the files that are uploaded as part of content assets folder.
Any help is appreciated.
GUID in path (90a388f260a04f54b4056becc1c58307) means that this is (most probably) a "For this page" / "For this block" folder.
You can query database like this using that GUID:
SELECT pkID, ContentOwnerID FROM tblContent WHERE ContentGUID = '90a388f2-60a0-4f54-b405-6becc1c58307'
pkID will contain an ID of content folder, and ContentOwnerID will contain GUID of content (page or block) which is this folder belongs to, which you can use again to find owner content ID.
(you can also do the same in code using for example IContentLoader.Get<T>(Guid contentGuid))
Then you can use that ID to change edit URL and open that content inside edit UI, and then click "For This Page" / "For This Block" folder in Media tab.
Finally i was able to get to the path to contentassets in case anyone is facing the similar issue.
Navigating to
/EPiServer/CMS/admin/ManageContent.aspx?id=10574
where 10574is the content Id
Here is the episerver forum post that was helpful:
https://world.episerver.com/forum/developer-forum/CMS/Thread-Container/2019/2/how-to-delete-unreferenced-content-from-the-ui/
So the url needs to be
https://loca.abc.com/EPiServer/CMS/admin/ManageContent.aspx?id=10574
In summary, i had to build the above url.
1- https://loca.abc.com/ can be found using isitedefinitionresolver
2- define a const string /EPiServer/CMS/admin/ManageContent.aspx?id=
3- append contend id at the end.in this case 10574
This url will give you option to either edit/manage/delete/move the item to trash.
I am not entirely sure I understand what you need, but if you want to determine an assets' folder you could look into the ContentAssetHelper
I am doing object detection for a specific class, say, chairs .
I want to download images of chairs from imageNet. I also want to download the annotation xml files (bounding boxes) from imageNet.
Both these things are provided on imageNet and I have successfully been able to download them using a tool called ImageNet_Utils
https://github.com/tzutalin/ImageNet_Utils
But the downloaded images and bounding boxes don't have matching names. So it is impossible to tell which xml file is for which image.
How do I download images and bounding boxes from imageNet such that corresponding image and annotation xml files have matching names?
The download image URLs page says
The URLs are listed in a single txt file, where each line contains an
image ID and the original URL
Unfortunately, as of 2020-03-06, all the URL mapping files link to a Oops! The URL is not valid page. However, can however get mappings for each node individually. They are available by wnid: http://www.image-net.org/api/text/imagenet.synset.geturls.getmapping?wnid=n03273913
A bounding box annotation file will contain this element.
<filename>n03273913_16800</filename>
The n03273913 is the synset id and the 16800 is the image id. In the synset mapping file you'll find the line
n03273913_16800 http://farm1.static.flickr.com/186/425238103_8fe80b37de.jpg
You can download the image from that location.
There's a c++ library known as dlib. You can pass your downloaded images from dlib, it has GUI support for drawing blocks in images and save them in vector formats in an XML file. You can refer here for the documentation
What function in Drupal gets file attachment path?
Edit: the attachments provided by Upload module in system section. But since you mentioned there may be another way around it. Maybe I could achieve may goals using FileField module so if you could tell me how to get a direct link of a file uploaded by FileField module that may also be very helpful.
Edit 2:
Ok I will start from my main and final objective:
It is to get an image linking to a file which visibility I could be managed using CCK module.
I am doing this step by step. So now I have written a code which generates the needed image and I have added that image to one of content types teaser. I found a way to warp my image in a tag and I had dug up simple attachments url. So my next step is to advance from simple upload attachment to the one added by FileFields and from odd looking HTML pace in all PHP document into beautifully managed CCK field.
How to fetch file path of a file uploaded FileFields?
Some plain and at the same time rich tutorials for making custom fields for CCK module.
Assuming you know how to get the $node object for a node containing a file attachment, this is super easy:
Upload (core)
$file = upload_load($node);
echo $file[1]->filepath;
Where 1 is the index of the file. Upload can let you upload more than one file, so file 2 would have an index of 2 and so on. If there's only one file, it'll always be 1.
More info: upload_load() API reference.
FileField
echo $node->field_fieldname[0]['filepath'];
Where field_filename is the short name you've used for the field, and 0 is the index of the field. CCK fields let you have multiple values in one field, so 0 would be the first, 1 would be the second, etc. If you only have one value, it'll always be 0.
Note: if you want to get the rendered output of the FileField using its formatters, you can just use $field_fieldname in your node template, or if you want to store the rendered output, you can use:
echo content_format('field_fieldname', $node->field_fieldname[0]);
More info: content_format() API reference.
Upload is a sad little module, and has been completely replaced with a core implementation of FileField in Drupal 7. If you have the option to use FileField, you should.
Don't direct links of file attachments appear below the uploaded file for the core Upload module?
Since you are trying to use images, you should use http://drupal.org/project/imagefield CCK module in order to add images to specified content type. After that using the Display fields tab in Content type configuration you can specify how image would be presented (as a link, image, image with link to node...) both in teaser and body view.
Is there any way of organizing a icon collection so that it easier to find needed icons?
For example:
the program needs a save icon
there are 5 icons collections on your HD that have a save icon and there are 5 more collections that don't have a save icon (but you don't know that)
do you browse through each icon collection?
run a search (assumes files are named consistently)?
Would it be ideal to have some sort of organized directory (printable?)?
UPDATE
My process so far:
Use XXCopy to merge all icon folders into one folder.
Syntax = xxcopy "C:\Documents and Settings\jm\My Documents\Icons" "C:\Documents and Settings\jm\My Documents\All_Icons" /s /sr
Use Contact Sheets to add all files from the super folder and then export out contact sheets for all the images. This should sort them alphabetically.
Print and put in a binder -> now to find the actual file all you need to do is browse the binder, find the filename, and then search via Windows for the actual folder location.
In Visual Studio, there is a ZIP file with icons organized in folders. The organization is mostly by filetype and image size, is pretty messy, and contains many duplicates, so you should probably not follow their example.
However, they provide a HTML file in each folder that shows the icons in that folder in a nice readable list (better than Explorer's standard preview). You could do something similar, but maybe provide a table instead, for example with one column per collection, and one row per "concept" (e.g. save icon).
Suppose I have bibtex data for, say, 10 articles. Is there a way to, within jabref, create 10 entries from this?
A solution is to just open the .bib file and paste the data in.
Select the text that forms the BibTex source of the multiple data entries and drag this into the library view of JabRef. You could probably drag all the files in, however I have not tested this.
alt text http://inverse.seednet.eu/snaps/jvvuow.png
go to File, Append Database. then browse in to bibtex files folder, you can select multiple files in a row, then click ok, if you have 20 bibtex or txt files, they will be all loaded to one bib file. It was great, solved my problem.
I often get BibTeX source code from citeulike.org, and I copy/paste this BibTeX source directly into JabRef by:
Menu: BibTex -> New Entry (Ctrl^N, or the green + button)
select a random type; I typically just pick Article
Down the bottom, in the new edit view, select the BibTeX source tab
Replace the BibTeX source in that tab, with that of one paper
And repeat this for all papers.
(OT: also, make sure to check the Web search menu.)