Un Zipping an attached file
I recieved an e-mail with a large zip file attached.
I double click on the attachment but can't open it on my minimac.
I did forward it to work and it opened with out a glitch.
Am I doing something wrong or does OSX not handle zip files.
Thanks,
Pete
Yes, attachment was xxx.zip
Tried to 'unstuff' it, but couldn't drag and drop onto unstuff icon.
when I click to open it asks if I want to open, I say yes and then it 'disapears"
Tried again this AM with no results.
Can open in Windows, but don't want to have to e-mail note to work to open
What do I do next?
Similar Messages
-
Zip a text file and send as email attachment
Hi,
I have a requirement to zip a text file and send it as an email attacment. I saw many posts with similar discussion on the forum but none gave me a very clear answer. Have anyone done this? If so please help.
Regards,
Hari.Hi Durairaj,
I am working in ECC 6.0 and all ZIP classes are available in my system. I am converting the ABAP spool to PDF. My PDF is too long (57MB) that i need to convert it to ZIP before i send it as a mail attachment. How do i do this?
Thanks,
RS -
Apache-zip.jar name attachment file bad encoding
I have following code. which create zip archive, but name attachment files bad encoding.
name attachment files in encoding UTF-8. letters of Russian alphabet -"имя.txt". get - "¯à¨ï⨥ àï¤ .txt" OS - Ubuntu 9.10 64-b
package action;
import org.apache.tools.zip.ZipEntry;
import org.apache.tools.zip.ZipOutputStream;
import java.io.*;
import java.util.Arrays;
import java.util.List;
public class CreateArchive {
private byte[] getByteFromFile(String file) throws IOException {
InputStream is = new FileInputStream(file);
long length = file.length();
if (length > Integer.MAX_VALUE) {
throw new IOException("Size file bad: "+file);
byte[] bytes = new byte[(int)length];
int offset = 0;
int numRead;
while (offset < bytes.length && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
offset += numRead;
if (offset < bytes.length) {
throw new IOException("Could not completely read file "+file);
is.close();
return bytes;
public void createZip(OutputStream outputStream, List<String> files) {
byte[] buf = new byte[1024];
try {
ZipOutputStream out = new ZipOutputStream(outputStream);
out.setEncoding("UTF-8");
for (String fileName: files) {
ByteArrayInputStream sourceStream = new ByteArrayInputStream(getByteFromFile(fileName));
out.putNextEntry(new ZipEntry(fileName));
int len;
while ((len = sourceStream.read(buf)) != -1) {
out.write(buf, 0, len);
out.closeEntry();
out.close();
} catch (IOException e) {
System.out.print(e);
public static void main(String[] args) throws IOException {
CreateArchive files = new CreateArchive();
OutputStream outputStream = new FileOutputStream("file.zip");
files.createZip(outputStream, Arrays.asList("имя.txt"));
outputStream.close();
}Sorry for me bad english
Edited by: P1tBull on Mar 24, 2010 5:35 AMReal task was create general archive is selected users files and transmission he in one stream
package action;
import org.apache.tools.zip.ZipEntry;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.util.Arrays;
import java.util.List;
import java.util.zip.ZipOutputStream;
public class StreamFiles extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
OutputStream out = response.getOutputStream();
try {
response.setContentType("'application/zip'; charset='UTF-8'");
response.setContentType("name=AllFile");
response.setHeader("Content-disposition", "attachment; filename*=utf-8" + "''" + java.net.URLEncoder.encode("AllFile.zip", "UTF-8") + ";");
if (request.getHeader("user-agent") != null) {
if (request.getHeader("user-agent").indexOf("Safari") != -1) {
response.setHeader("Content-Disposition", "attachment");
response.setContentType("application/octet-stream");
} else if (request.getHeader("user-agent").indexOf("MSIE") != -1 || request.getHeader("user-agent").indexOf("Chrome") != -1) {
response.setHeader("Content-disposition", "attachment; filename=" + java.net.URLEncoder.encode("AllFile.zip", "UTF-8"));
List<String> files = Arrays.asList("catalina.bat", "startup.sh", "version.sh", "tomcat-juli.jar");
createZip(out, files);
} catch (Exception ex) {
request.setAttribute("javax.servlet.jsp.jspException", ex);
RequestDispatcher requestDispatcher = request.getRequestDispatcher("/error.jsp");
requestDispatcher.forward(request, response);
} finally {
out.flush();
out.close();
private byte[] getByteFromFile(String file) throws IOException {
InputStream is = new FileInputStream(file);
long length = file.length();
if (length > Integer.MAX_VALUE) {
byte[] bytes = new byte[(int)length];
int offset = 0;
int numRead;
while (offset < bytes.length && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
offset += numRead;
if (offset < bytes.length) {
throw new IOException("Could not completely read file "+file);
is.close();
return bytes;
public void createZip(OutputStream outputStream, List<String> files) {
byte[] buf = new byte[1024];
try {
ZipOutputStream out = new ZipOutputStream(outputStream);
for (String fileName: files) {
ByteArrayInputStream sourceStream = new ByteArrayInputStream(getByteFromFile(fileName));
out.putNextEntry(new ZipEntry(fileName));
int len;
while ((len = sourceStream.read(buf)) != -1) {
out.write(buf, 0, len);
out.closeEntry();
out.close();
} catch (IOException e) {
System.out.print(e);
}but mistake on real host don't repeated, so thanks for answer
Edited by: P1tBull on Mar 24, 2010 8:14 AM -
How to ZIP a PDF file email attachment
Hi,
We have an ABAP report requirement to send an email to a user. This program will send an email with PDF attachement. However, the PDF attachment is quite big (9MB) and our email server couldn't handle it (5MB only). Is there any way to ZIP this PDF file attachment?
I am using a SAP release 4.6C with OS WinNT. And the ABAP program should be able to run in Foreground/Background.
Thanks for your help in advance...
Kind regards,
HersonRead Notes:
616958
644640
You can create a class method:
CALL METHOD zca_tools=>zip_table
EXPORTING
i_data_table = <data_struc>
i_filename = 'aa'
IMPORTING
e_bin_table = t_zipped
e_bin_length = lines.
METHOD zip_table.
DATA: lv_original_length(10) TYPE n,
lv_data_ref TYPE REF TO data,
lv_struc_ref TYPE REF TO data.
DATA: lv_zip TYPE REF TO cl_abap_zip,
lv_lines TYPE i,
lv_length TYPE i,
lv_data_to_zip TYPE xstring,
lv_zip_file TYPE xstring,
lv_catch TYPE REF TO cx_root,
lv_message TYPE string.
FIELD-SYMBOLS: <data_struc> TYPE ANY,
<final_data> TYPE ANY,
<final_data_table> TYPE STANDARD TABLE,
<aux> TYPE x.
LOOP AT i_data_table ASSIGNING <data_struc>.
DESCRIBE FIELD <data_struc> LENGTH lv_original_length IN CHARACTER MODE.
EXIT.
ENDLOOP.
TRY.
CREATE DATA lv_data_ref TYPE c LENGTH lv_original_length.
ASSIGN lv_data_ref->* TO <final_data>.
CREATE DATA lv_data_ref LIKE STANDARD TABLE OF <final_data>.
ASSIGN lv_data_ref->* TO <final_data_table>.
APPEND LINES OF i_data_table TO <final_data_table>.
DESCRIBE TABLE <final_data_table> LINES lv_lines.
ASSIGN COMPONENT 1 OF STRUCTURE <final_data> TO <aux> CASTING.
IF sy-subrc NE 0 OR NOT <aux> IS ASSIGNED.
ASSIGN COMPONENT 0 OF STRUCTURE <final_data> TO <aux> CASTING.
ENDIF.
DESCRIBE FIELD <aux> LENGTH lv_length IN BYTE MODE.
MULTIPLY lv_length BY lv_lines.
CATCH cx_root INTO lv_catch. "#EC CATCH_ALL
lv_message = lv_catch->get_text( ).
MESSAGE lv_message TYPE 'E' RAISING error.
ENDTRY.
CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'
EXPORTING
input_length = lv_length
first_line = 1
last_line = lv_lines
IMPORTING
buffer = lv_data_to_zip
TABLES
binary_tab = <final_data_table>
EXCEPTIONS
failed = 1
OTHERS = 2.
IF sy-subrc NE 0.
IF sy-msgty IS INITIAL.
sy-msgty = 'S'.
ENDIF.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 RAISING error.
ENDIF.
CREATE OBJECT lv_zip.
CALL METHOD lv_zip->add
EXPORTING
name = i_filename
content = lv_data_to_zip.
CALL METHOD lv_zip->save
RECEIVING
zip = lv_zip_file.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = lv_zip_file
TABLES
binary_tab = e_bin_table.
TRY.
DESCRIBE TABLE e_bin_table LINES lv_lines.
e_bin_length = lv_lines * 255. "255 is the length of each line of e_bin_table
CATCH cx_root INTO lv_catch. "#EC CATCH_ALL
lv_message = lv_catch->get_text( ).
MESSAGE lv_message TYPE 'E' RAISING error.
ENDTRY.
ENDMETHOD.
I hope it helps!
Regards,
Frinee -
Attaching .zip and .sitx files
It seems that attaching .zip and .sitx files is not supported in this new forum. Is this correct?
Also I could not find a "Forum Support" link where I could have posted this. The one near the top of the page on the left in the black rectangle, seems to be for products tech support and not for the forum. Or did I miss something?
Al
Edit: I just tried to attach one and got "The content type of this attachment is not allowed."Al,
Doesn't surprise me because the mail filters at Adobe.com have the same restriction. Use this forum to make this kind of comment: http://forums.adobe.com/community/new_forum_faq/english_faq/english_discussions
Dave -
How to zip a text file and send as email attachment in SAP version 4.6c?
Hi Guru,
How to zip a text file in SAP version 4.6c which doesn't have class CL_ABAP_ZIP?
Please help.
Thanks & Regards,
AriHi,
Try this link
[http://sap.ittoolbox.com/groups/technical-functional/sap-dev/sapr3dev-zip-file-from-sap-1707099?cv=expanded]
Cheers,
Surinder -
Cannot save attached files in Mail
My problem has to do with using the Mail program on a MacBook Pro running Mavericks. Lately when I receive an email with a file attachment (image, Word doc, PPT file, whatever) I cannot save the attached file.
I point to the attachment "download" dialog box, and choose either the "save all" option or the specific attachment filename shown, then navigate to the desired folder and hit "save". But no file is created.
The attachments are there - if I look at the same email using the gmail web-based mail utility I can easily download it. It's a problem with the Apple Mail client.
Any suggestions? Thank you.
JerryZips and other archived/compressed files won't work as expected on an iPad since you can't just preview/view the contents directly from the attachment currently like you can with quicktime-compatible or other common media formats. Basically you would need to be able to save the zip file to the finder and extract it, and view the contents from there. But since the iPad doesn't have anything like a user-accessible Finder, it's tricky to implement.
There may be third-party apps that deal with this eventually (or maybe even something from the upcoming 4.0 software, who knows), but it would probably be easier to just have people send you attachments that aren't zipped up for now. -
Zip text attachment using so_document_send_api1
hi
i have a requirement to send the text file attachment and mail after zipping the attachment.
I have used fm so document send api1 to attach the text file and send to mail.But somehow i am not able to zip the file first.
i have also tried using the fm so new document send api1 but again no success.
Can someone send me a full sample code which i can refer ?.
Thanks in advanceA more precise statement might get you better answers.... "But somehow i am not able to zip the file first." Does that mean your program can't obtain the file or that you are unable to attach to emai or ??
See SAP Note 609696 for working code samples and documentation for these APIs, if you want to continue to use these out-of-date methods ( see BCS classes/sample programs for state-of-product email). -
How to ZIP a PDF File with a Password Protection
Hi,
i've a pdf file with created smartforms and i want to assign a password to that pdf file but the SAP doesn't let doing that protection. So i want to create a zip file with a password protection for PDF file.
How can i create a zip file with a password protection? Can somebody help me please?
Thanks.Hello,
Check this links
Take a look to the class CL_ABAP_GZIP
open (top-)zip-archive
CALL METHOD lo_zip->load
EXPORTING
zip = lv_zip_file_head
EXCEPTIONS
zip_parse_error = 1
OTHERS = 2.
create sub-zip-archives which contain the files you would assign to a folder
add sub-zip-archive to top-zip-archive
CALL METHOD lo_zip->add
EXPORTING
name = lv_zip_filename
content = lv_zip_file.
save zip-archive
CALL METHOD lo_zip->save
RECEIVING
zip = ev_zip_file.
ABAP Development
How to ZIP a PDF file email attachment
Re: How to ZIP a PDF file email attachment -
How do you attach files in mail only as icons?
When I am attaching files (in particular PDF's or Power Point) to an email message in Apple mail the file is opened and attached to the end of the message.
How can I attach it only as an icon or convert it to an icon.I tried your suggestion on "compressing the file' in Finder and it attached the zip file. The only problem is it created an additional file (zipped) on my drive.
Thanks -
Need instructions on how to zip and unzip roboehelp 6 files.
When I zip, try to send file attachment, then try to unzip all I
view is long stream of files and open up RH xpj but see nothing but
empty new robohelp file.quote:
Originally posted by:
marvinwalker
I am doing the following to zip file; right click on
folder;add to ....zip. To unzip I am right click, unzip
folder,extract to here. or trying to e-mail file; attach file then
unzip, extract to....double click....when I go to view my project
there are many files in extract mode and I look for RH xpj; open
and its a blank project.......should I not be able to open RH zpj
in extract mode and view entire project? I guess I need some step
by step instructions.
I get the empty RH shell when I open the xpj from within the
zip file.
Depending on the zip program you use, the zip folder may look
almost exactly the same as a regular folder. So perhaps you are
opening the xpj that is in the zip file, rather than the extracted
one?
Perhaps try the following:
* put the zip file in c:\temp
* extract to c:\mytestproject (or something else completely
different from the location of the zip file)
* make sure you navigate to c:\mytestproject to open the xpj. -
I am trying to reduce the size of an attachment/file. I am wondering how to take parts of one file and create a new (smaller) file?
I think you're using the wrong terminology here. A "folder" on your computer is a folder, not a file (even though it looks like a file folder like in the real world). A "file" on your computer is just that, a singular file be it a Word document, picture file, PDF of something, Excel file, whatever.
That said, if you're trying to email a folder to someone, you can't do that. Email attachments cannot be a folder (i.e. a directory container of multiple files). To separate different files in different folders, you simply drag whatever file you want into whatever folder you want, but you still won't be able to just email the split up folders because it doesn't work like that.
What you need to do if all the files together are too big to send is to first try to zip them all up. Find the folder they're in and select all the files by clicking and dragging a selection square around all of them with your mouse. Once you've done that, right click on one of the selected files making sure you don't accidentally deselect all of them and compress them off the context menu that comes up. The new zip file that's created will contain all the files you just compressed into it. You can then email this one singular zip file and the receiver will just uncompress it and see all the files you have in it. If you have multiple file groups you want to do this with, you can do the same steps for those selections. There's no right or wrong number of files you can zip together, the gotcha is that if your initial issue was that the email attachments were too big, you'll need to figure out what grouping to do to make everything small enough. The Word documents will compress the most since it's just text. The PDFs and picture files the least (if you also have those kinds of files you're dealing with). -
Hi
I've tried to send a mail with a zip-file as attachment. The mail can be sent and I receive it, but unfortunately there is no attachment attached to it ?
Here is the code (that is part of a servlet normally but since I can't post it here totally I copied the code that refers to the mail sending�
CODE
String mailHost = "smtp-server";
String to = "[email protected]";
String from = "[email protected]";
String subject = "Packaging information";
String body = "Dear, Madam, Sir, \n";
if ((from != null) && (to != null) && (subject != null) && (body != null)) // we have mail to send
try {
//Get system properties
Properties props = System.getProperties();
//Specify the desired SMTP server
props.put("mail.smtp.host", mailHost);
// create a new Session object
Session session = Session.getInstance(props,null);
// create a new MimeMessage object (using the Session created above)
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(from, "Packaging"));
message.setRecipients(Message.RecipientType.TO, new InternetAddress[] { new InternetAddress(to) });
message.setSubject(subject);
// message.setContent(body, "text/plain");
//Create the message part
BodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setText(body);
Multipart multipart = new MimeMultipart();
multipart.addBodyPart(messageBodyPart);
//Attachment
messageBodyPart = new MimeBodyPart();
DataSource source = new FileDataSource("E:\\Files\\images.zip");
messageBodyPart.setDataHandler(new DataHandler(source));
messageBodyPart.setFileName("E:\\Files\\images.zip");
multipart.addBodyPart(messageBodyPart);
// Put parts in message
message.setContent(multipart);
Transport.send(message);
} catch (Throwable t) {
Anyone can help me please ?String attachmentPath = "/usr/webMail";
String testString = "noneAttached";
if (!attachmentFile.equals(testString))
int stringLength = attachmentFile.length();
int nameStart = attachmentFile.lastIndexOf("/");
nameStart = nameStart + 1;
String fileName = attachmentFile.substring(nameStart,stringLength);
String newFile = (attachmentPath + "/" + fileName);
File fileData = new File(newFile);
MimeBodyPart mbp2 = new MimeBodyPart();
FileDataSource fds = new FileDataSource(fileData);
DataHandler dh = new DataHandler(fds);
mbp2.setFileName(fileName);
mbp2.setDescription("Attached File:" + fileName);
mbp2.setDisposition(Part.ATTACHMENT);
mbp2.setDataHandler(dh);
mp.addBodyPart(mbp2);
} -
Delete specific attachment file through Conversion Channel ?
version : iMS5.2 sp1
O/S : Solaris 2.6 Generic_105181-29
I wanted to delete specific attachment file(ex: ALTDESK.ZIP) through Conversion Channel.
So I set up like below..
1) In mappings file
=================
CONVERSIONS
IN-CHAN=tcp_intranet;OUT-CHAN=tcp_local;CONVERT Yes
==============
I only want to delete attached file from tcp_intranet to tcp_local.
2) msg-INSTANCE/imta/config/conversions
example mail header ::
--- omit ----
MIME-version: 1.0
X-Mailer: iPlanet Messenger Express 5.2 Patch 1 (built Aug 19 2002)
Content-type: multipart/mixed; boundary=--6b2385053506b85
Content-language: ko
X-Accept-Language: ko
Priority: normal
This is a multi-part message in MIME format.
----6b2385053506b85
Content-Type: text/plain; charset=EUC-KR
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
----6b2385053506b85
Content-Type: application/x-zip-compressed
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=ALTDESK.ZIP
- conversions file setting
==================================================
in-channel=tcp_intranet; out-channel=tcp_local;
in-type=application; in-subtype=x-zip-compressed;
parameter-symbol-0=ALTDESK.ZIP; parameter-copy-0=*;
dparameter-symbol-0=ALTDESK.ZIP; dparameter-copy-0=*;
message-header-file=2; original-header-file=1;
override-header-file=1; override-option-file=1;
command="/product/leeky/convert.sh"
============================================
3) /product/leeky/convert.sh file
========================
#!/bin/sh
if [ $? -eq 1 ]; then
echo "STATUS=178030178" >> $OUTPUT_OPTIONS
else
cp $INPUT_FILE $OUTPUT_FILE
fi
=========================
4) The problems I face are
- All of zip files which are filtered is deleted. As you can see 2) I only want to delete ALTDESK.ZIP file
But, all of the zip-compressed files are deleted at the moment.
- This converison channel is work(even if all zip-compressed files are deleted). But sometimes this is not
working(2 or 3 times out of 10). I don not know why.
- Above all, I am not sure 2) and 3) settings are good. English is a second language to me. So it was
not easy to understand conversion channel setting in Admin Guide.
- How can I see the out put of "$OUTPUT_OPTIONS" ? I do not know where I can see that.
Is there anybody to help me ?The section of the admin guide which can help is:
http://docs.sun.com/source/816-6009-10/channel2.htm#42283
Here there is an explanation of how the mime headers of the message part would align with the entries one would put into the conversions file entry. (The document has an error where it talks about APPARENT_NAME and APPARENT_FILENAME. It should really say the words "NAME" and "FILENAME" respectively).
Based on that document, the MIME headers of your message part :
Content-Type: application/x-zip-compressed
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=ALTDESK.ZIP
will align with a conversions file settiong of:
in-channel=tcp_intranet; out-channel=tcp_local;
in-type=application; in-subtype=x-zip-compressed;
parameter-symbol-0=NAME; parameter-copy-0=*;
dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
message-header-file=2; original-header-file=1;
override-header-file=1; override-option-file=1;
command="/product/leeky/convert.sh"
and a /product/leeky/convert.sh script which reads something like:
#!/bin/sh
grep "$FILENAME" /product/leek/badfiles.list
if [ $? -eq 1 ]; then
echo "STATUS=178030178" >> $OUTPUT_OPTIONS
else
grep "$NAME" /product/leek/badfiles.list
if [ $? -eq 1 ]; then
echo "STATUS=178030178" >> $OUTPUT_OPTIONS
else
cp $INPUT_FILE $OUTPUT_FILE
fi
fi
The lines:
parameter-symbol-0=NAME; parameter-copy-0=*;
dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
tells the conversion channel to make the environment variable $NAME avaliable to your program with a value corresponding to the "name=" clause on the Content-Type line of the MIME headers. The environment variable $FILENAME is made avalable to your program and takes on the value extracted from the filename=" clause on the content-disposition line of the MIME headers.
The document at :
http://docs.sun.com/source/816-6092-10/conversion.html
may help provide other examples. -
Why cann't I open the attachment files sent to me by e-mails?
Hi there,
I have a question. I receive e-mails with attachment file. When I clicked at the file, message popped up: Adobe reader cannot open this file. It was sent by e-mail attachment but was incorrectly decoded. How can I resolve this problem?
Thank you.Nelly, this is a user to user forum; no Adobe personnel is assigned to answer questions here, so you cannot expect instant replies.
Without further information, I would suggest asking for the PDF file (I am assuming that it is a PDF file) to be sent again but in compressed (zipped) form.
Maybe you are looking for
-
Deleing large number of rows from table
Hi, Consider tables A,B,C,D,E,F. all are having 100000++ records Tables B,C,D are dependent on table A (with foreign key constraint). When I am deleting records from all tables, table B,C,D are taking max 30-40 seconds while table A is taking 30-40 m
-
Hello all, Global Expense Report System produce a file and need to process the file content with SAP R/3 for GL Post and AP. I came to know following the BAPIs can do job for GL Post and AP BAPI_ACC_DOCUMENT_CHECK BAPI_ACC_DOCUMENT_POST I want to mak
-
To whom it may concern, I am not sure about the cause, however I have experienced hanging of the programme repeatedly. I have not been able to solve it otherwise than by ending the process via task manager (I am using Firefox 4.0.1 running on Win XP
-
Will there be an update to Aperture 4?
Will there be an update to Aperture 4? Or better said: will ever there be a major update to Apple Aperture?
-
Has anyone else seen this strange (I think) problem?
I'm running XP pro SP2 w/all updates. I installed 1.4.1 after first uninstalling 1.3. Everything seemed to work fine. The next day when I turned my computer on I received an error message that no DVD drives were found. I have two and neither showed u