attachment

How to prevent attachments from being stored in _source with Elasticsearch and Tire?

天涯浪子 提交于 2019-12-21 19:24:54
问题 I've got some PDF attachments being indexed in Elasticsearch, using the Tire gem. It's all working great, but I'm going to have many GB of PDFs, and we will likely store the PDFs in S3 for access. Right now the base64-encoded PDFs are being stored in Elasticsearch _source, which will make the index huge. I want to have the attachments indexed, but not stored, and I haven't yet figured out the right incantation to put in Tire's "mapping" block to prevent it. The block is like this right now:

How to export attachments (images) with a given name to a folder?

穿精又带淫゛_ 提交于 2019-12-21 05:44:16
问题 My ex-colleague built an Access database with many record sets and each of them has one to five pictures attached. The size of the database is now really big (about 2 GB) and it is really slow. I managed instead of including the pictures in the database attachment, to just store the path and the name of the picture as strings in the columns and then recall them whenever I need to do that. Now I have to export all of the existing images (about 3000 pictures) from the database to a folder after

Is it possible to interact with hidden elements with capybara?

只愿长相守 提交于 2019-12-20 15:50:10
问题 I have a file field that has opacity: 0 and is overlaping a fake button. Its a common css technic to fake a sort of "Upload button" that displays consistently across different browsers. Capybara doesn't allows me to call attach_file on that input. The error is Selenium::WebDriver::Error::ElementNotVisibleError: Element is not currently visible and so may not be interacted with . Anybody knows any way to force capybara to interact with invisible elements? The answer is still unanswered, but I

Is it possible to interact with hidden elements with capybara?

♀尐吖头ヾ 提交于 2019-12-20 15:49:24
问题 I have a file field that has opacity: 0 and is overlaping a fake button. Its a common css technic to fake a sort of "Upload button" that displays consistently across different browsers. Capybara doesn't allows me to call attach_file on that input. The error is Selenium::WebDriver::Error::ElementNotVisibleError: Element is not currently visible and so may not be interacted with . Anybody knows any way to force capybara to interact with invisible elements? The answer is still unanswered, but I

Fetching attachments from gmail via either python or php

断了今生、忘了曾经 提交于 2019-12-20 15:16:30
问题 I have been trying to find information on how to retrieve attachments from a gmail account in either python or PHP, I'm hoping that someone here can be of some help, thanks. Related: How can I download all emails with attachments from Gmail? 回答1: You will have to enable IMAP access to your GMail account (Settings → Forwarding and POP/IMAP), and then use imaplib.IMAP4_SSL to access it. Use the raw text of every message as an argument to email.message_from_string in order to process any

php: download variable content as file

人走茶凉 提交于 2019-12-20 13:04:44
问题 Is the subject possible? I have a script executing. At one point I have a large piece of text in a variable. Could I make it available as a downloadable file without actually writing variable content to disk? <?php echo "Hello"; //how do I make the content of this variable downloadable? $download_me = "download me..."; echo "Bye"; ?> 回答1: If you mean letting the user click a link and have a dialog box pop up to save certain content as a text file: <?php $download_me = "download me..."; header

Application crashes when I choose a picture from gallery and integrate it into Gmail

穿精又带淫゛_ 提交于 2019-12-20 07:55:43
问题 I'm trying to create an application that lets the user choose an image from the gallery or take a new one, and then send it via email. The function that takes the picture works perfectly (I can take it and then email it). But when I try to choose a picture, my application crashes. Here is my Java file: public class Request extends Activity { Button send; Bitmap thumbnail; File pic; protected static final int CAMERA_PIC_REQUEST = 0; private static final int SELECT_PICTURE = 1; private String

How does jQuery.post() deal with Content-Disposition: attachment?

我们两清 提交于 2019-12-20 05:16:24
问题 Going slightly crazy here. I'm making an Ajax call using jQuery.post as follows: $.post('php/print.php',{data:dS},function(res){... },"text"); I'm returning from print.php (as a test): header("Content-type: application/vnd.ms-word"); header("Content-Disposition: attachment;Filename=test.doc"); echo "<html>"; echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=Windows-1252\">"; echo "<body>"; echo "Testing-2-3!"; echo "</body>"; echo "</html>"; The data is coming through fine

How does jQuery.post() deal with Content-Disposition: attachment?

两盒软妹~` 提交于 2019-12-20 05:16:06
问题 Going slightly crazy here. I'm making an Ajax call using jQuery.post as follows: $.post('php/print.php',{data:dS},function(res){... },"text"); I'm returning from print.php (as a test): header("Content-type: application/vnd.ms-word"); header("Content-Disposition: attachment;Filename=test.doc"); echo "<html>"; echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=Windows-1252\">"; echo "<body>"; echo "Testing-2-3!"; echo "</body>"; echo "</html>"; The data is coming through fine

Attachment file \\SERVER\file.csv is invalid. [SQLSTATE 42000] (Error 22051). The step failed

柔情痞子 提交于 2019-12-20 04:59:19
问题 I've got 4 SQL servers: SQL Server 2005, SQL Server 2008, SQL Server 2008 R2 and SQL Server 2012. In SQL Server 2008 R2; I have created a SQL job that sends me email every Monday with reports from SQL Server 2005, SQL Server 2008 and SQL Server 2008 R2 on databases that are older than 3 months and it works just fine. But, now that I want to add SQL Server 2012, the job fails with the following error: Executed as user: NT AUTHORITY\SYSTEM. Configuration option 'show advanced options' changed