Freeman35 Posted July 1, 2019 Share Posted July 1, 2019 Hello, I need Get file name(s) then upload manual. Why I need: I need mail send form, I did this. but I wanna file attachment too. For this, I need make a file list first (On client side) when user wanna send mail, then first upload files to server then attach file(s) and send mail. Why I have to upload file directly first? This is style is bandwidth killer. I wanna make list first then I'll upload if I want. How to do this? regards. Link to comment Share on other sites More sharing options...
Sherzod Posted July 1, 2019 Share Posted July 1, 2019 Hello, If I understand you correctly, you can only select a file on the client side, just like all other web email services. Regards, Link to comment Share on other sites More sharing options...
Freeman35 Posted July 1, 2019 Author Share Posted July 1, 2019 Hi, Nearly yes. Yes, select file, then I add path& name to memtable. And uniform has a "Send" buton. When enduser click this button, file(s) 's path&name will get from memtable and file(s) start to upload. regards. Link to comment Share on other sites More sharing options...
rtalmeida Posted July 1, 2019 Share Posted July 1, 2019 I may be talking the biggest bullshit, but you can not get a ZIP compressed file and on the server unpack and process these files? Link to comment Share on other sites More sharing options...
Freeman35 Posted July 2, 2019 Author Share Posted July 2, 2019 Maybe rename extantion of zip to any then extract. But I didn't try. And I'm still try my app on my server. Its not on hosting. If I'm not wrong, you can use "tar" file on unix. TUniFileUpload can select file and upload it, I wanna get file name enduser selected file. then when I want upload this. Why I can not do this easy thing? Link to comment Share on other sites More sharing options...
Sherzod Posted July 2, 2019 Share Posted July 2, 2019 18 hours ago, Freeman35 said: For this, I need make a file list first (On client side) when user wanna send mail Hello, Can you please clarify this point, what do you mean? Link to comment Share on other sites More sharing options...
Freeman35 Posted July 2, 2019 Author Share Posted July 2, 2019 Hello, First step if TOpenDialog.Execute then begin if not MEMTable.Active then MEMTable.Open; MEMTable.Append; MEMTable.FieldByName('Name').AsString := ExtractFileName(TOpenDialog.FileName); MEMTable.FieldByName('Path').AsString:= TOpenDialog.FileName; MEMTable.Post; end; Second step; While not MEMTable.EOF do begin TUniFileUpload....??????? (MEMTable.FieldByName('Path').ASString); If I upload file(s) no metter howto upload. :) MEMTable.Next; End; hehe, much better colonial language Link to comment Share on other sites More sharing options...
Sherzod Posted July 2, 2019 Share Posted July 2, 2019 6 minutes ago, Freeman35 said: MEMTable.FieldByName('Path').AsString:= TOpenDialog.FileName; For security reasons browsers do not allow this... (i.e. - FullPath) Link to comment Share on other sites More sharing options...
Sherzod Posted July 2, 2019 Share Posted July 2, 2019 But after all the user must first upload files (when attaching files). You can create a unique directory and control if the user sends mail at the end, then leave, otherwise delete the directory. Link to comment Share on other sites More sharing options...
Freeman35 Posted July 2, 2019 Author Share Posted July 2, 2019 I understood, Can I get filename(s) without path(s), MEMTable.FieldByName('Name').AsString := ???? Link to comment Share on other sites More sharing options...
Sherzod Posted July 2, 2019 Share Posted July 2, 2019 Yes, UniFileUpload1.FileName - this is the file name. Use UniFileUpload1 -> OnCompleted event Link to comment Share on other sites More sharing options...
Freeman35 Posted July 2, 2019 Author Share Posted July 2, 2019 I saw you faster then me AStream: TFileStream MEMTable.FieldByName('Name').AsString := AStream.FileName; Now much more HATE java & script Thank you, ( Did you see turtle in your PM ) Link to comment Share on other sites More sharing options...
Sherzod Posted July 2, 2019 Share Posted July 2, 2019 57 minutes ago, Freeman35 said: Did you see turtle (Zeno's paradoxes) Link to comment Share on other sites More sharing options...
Freeman35 Posted July 2, 2019 Author Share Posted July 2, 2019 3 minutes ago, Sherzod said: (Zeno's paradoxes) No metter, " there is no spoon " Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now