• 附件图片的显示公式


    REM   "First   check   to   see   if   the   file   can   be   viewed   as   an   image   in   the   browser ";
    NoPreviewMsg   :=   "无可用图片   -   附加文件的类型属于未知的图像类型。 ";
    SupportedImages   :=   ".gif ": ".jpeg ": ".jpg ": ".jpe ": ".jfif ": ".pjpeg ": ".pjp ";

    @If(@Ends(@LowerCase(FileUpFileName);   SupportedImages);   " ";   @Attachments   =   0;   @Return( " ");   @Return(NoPreviewMsg));

    REM   "Determine   the   directory   seperator   from   the   platform   that   we   are   running   on ";
    DirSep   :=   @If(@Contains(@Platform;   "Win "   :   "OS/2 ");   "\\ ";
                                                          @Contains(@Platform;   "UNIX ");   "/ ";
                                                          @Contains(@Platform;   "Mac ");     ": ";
                                                            " ");

    REM   "Construct   the   URL   to   preview   the   file   attachment ";
    DBPath   :=   @Subset(@DbName;   -1);
    DBPathFixed   :=   @ReplaceSubstring(DBPath;   DirSep;   "/ "   );
    View   :=   "LookupPersonalProfiles ";
    AbbrName   :=   @Name([Abbreviate];   Who);
    replspName   :=   @ReplaceSubstring(AbbrName;   "   ";   "# ");
    KeyName   :=   @ReplaceSubstring(replspName;   "/ ";   "_ ");

    key   :=   @Subset(@AttachmentNames;   1);

    DocID   :=   @Text(@DocumentUniqueID);
    URL   :=   "[ <img   src= "   +   "\ "/ "   +   DBPathFixed   +   "/ "   +   View   +   "/ "   +   KeyName   +   "/$file/ "   +   Key   +   "\ "> ] ";
    "[ <BR> ] "+U

  • 相关阅读:
    MindSpore 建立神经网络
    MindSpore 数据加载及处理
    MindSpore 初探, 使用LeNet训练minist数据集
    Ubuntu 20.04 Xrdp Black Screen Ubuntu 20.04 Xrdp 远程桌面黑屏
    基于Transformer的ViT、DETR、Deformable DETR原理详解
    Ubuntu 18.04 / 20.04 自定义锁屏时间
    Transformer中K 、Q、V的设置以及为什么不能使用同一个值
    Auto-Encoding Scene Graphs for Image Captioning
    Eureka中读写锁的奇思妙想,学废了吗?
    PostgreSQL-查询所有索引
  • 原文地址:https://www.cnblogs.com/hannover/p/2184812.html
Copyright © 2020-2023  润新知