Create a thumbnail of document after uploading? - reactjs

I am making a tiny website with reactJS where users can upload documents and share them,since multiple extensions are being uploaded,I managed to make the viewing work by just using google docs viewer.
but now i want to have thumbnails of those files,maybe of the first page so that it shows up un the search feature.
seeing that theres many extensions flying around i cant figure out how to approach this,what can i use to solve this problem ?
thank you.

Related

ReactJS document scanner

I am new to Reactjs i am searching for a library that can be used to scan the documents from the scanner and show a preview in the react application and once i click save i need to save the preview as a pdf file.
I have looked at the options like Dynamic web TWAIN but it needs to be paid once the trial period is completed.
I would like to know is there are any open-source libraries or approaches to tackling my problem.
Thanks in advance.

Angular.js: Is there any disadvantage of hash in url with respect to SEO?

I am making a website using AngularJS, I am curious to know that is there any disadvantage of hash in url with respect to seo ?
e.g. http://www.website.com/#about-us
I'll appreciate any contribution.
Thanks
If we go back to the basics, HASH # means a DIV ID in your HTML, and to talk in more details Google ignores anything after the HASH.
Example, this page www.mydomain.com is similar to www.mydomain.com/#about-us
This is an advanced technique some marketers are using it to track their campaign without using parameters like UTMs to avoid content duplication.
To make sure your page is loading without any errors, try to disable the JS from your browsers using "Web Developer Tool" and then load your page, i think you will get a white page without content and this is the way Google and most of the search engines see your pages.
Also there is another way to test it by going to Search Console "Webmaster tool" and use fetch as Google, here you will see exactly how Google view your page.

LinkedIn share links to PDF documents

I am trying to create buttons on a web page that allow users to share links to PDF documents on LinkedIn. LinkedIn loads a window without any errors but offers no link or preview of the PDF or any indication of what is being shared.
Here are the two methods I have tried. First the plugin method.
<script type="in/share" data-url="http://example.net/DocumentDownload.aspx?Command=Core_Download&entryID=114"></script>
And, secondly with a custom url.
TEST
Encoding the url makes no difference.
The above links are direct document links from a DNN web site using Document Exchange. If I change the urls to any html page it works fine and LinkedIn seems to be able to extract the useful information right from the page and use that for the share details.
Can LinkedIn handle this kind of thing? There is nothing to guide me on the type of links that can be shared. I can't find any information about it. There are no errors in the web console.
Not sure, but you should try to provide LinkedIn with the link that has .pdf at the end, like http://example.com/documents/file1.pdf. I guess LinkedIn just checks the URL if it has .pdf file at the end to decide if it is a PDF document or not.
I have no problem sharing pdf's on LinkedIn. Check it out...
https://www.linkedin.com/sharing/share-offsite/?url=https://www.revoltlib.com/anarchism/the-conquest-of-bread/view.pdf
Works perfectly fine. And view.pdf is a script, not a file, either, so, it's not looking for a PDF file to analyze, so much as headers that indicate you have a PDF file available to analyze, so, in PHP, at DocumentDownload.aspx, we would do...
header('Content-type: application/pdf; charset=utf-8');
This header let's the sharing app know that it can analyze the document as a PDF file and extract useful information from it, as you can see from the screen shot.

Organizing music files from online

I am building a website which i would be uploading songs to my database. I am planning to upload the songs manually while another thought came into mind if there was a way to crawl online and get the songs. Is there a way that can be possible? I have looped through stack overflow and find no solution to this. Any help on organization songs would be appreciated. API's are out of my line for now.
There are actually many sites that do this. What you need to do is build a regular crawler that crawls links off web pages. When you hit a URL that has the content type of media files (such as audio/mpeg for MP3 files), then download it.
Once you have the media file, use FFprobe to get the metadata, and store this in your database along with the URL.
An alternative to all of this is let Google figure it out for you. You can actually search for audio content types.

Issues with displaying salesforce rich text editor image

We are having few rich text box in our custom objects in force.com enterprise edition. These rich text box are rendered in an android application given to our clients. Till now we were using the android app online but due to huge customer demand, we wish to make our app offline. But we are facing difficulties due to images in rich text box. The images in rich text box are stored as in a form
But when we try to use the android app offline, we cannot see the images in webview. Consulting our web developer, he said that the images do not have static path and so they cannot be downloaded and stored for offline use. So my query is, is there some way, which will help us to get static path for the images inserted in Rich Text Box available in force.com, so that we can use them offline.
Thanks!
I had the same problem some time ago and also raised the issue with salesforce. They got back to me saying that images within rich text boxes could be stored in any server and needs to be authenticated to via a browser to have access too.
But you could try to use this, but its not a guaranteed approach as salesforce can change the way they store images.
http://boards.developerforce.com/t5/General-Development/API-access-to-Knowledge-article-content-inline-images/td-p/233065
Hope this helps.
Here's the response from SFDC :
As discussed over the call, as of now Salesforce does not have this feature built in the current release, else we would be more than happy to help you.
However, you can also post an idea on our Idea Exchange, where our customers share their ideas and expectations. (http://sites.force.com/ideaexchange/ideaHome)
Please feel free to contact us, if you need any further assistance.
Thank you for contacting salesforce.
Regards
Developer Support Engineer
salesforce.com

Resources