• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript fileuploader.CoreFileUploaderProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中@core/fileuploader/providers/fileuploader.CoreFileUploaderProvider的典型用法代码示例。如果您正苦于以下问题:TypeScript CoreFileUploaderProvider类的具体用法?TypeScript CoreFileUploaderProvider怎么用?TypeScript CoreFileUploaderProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了CoreFileUploaderProvider类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: uploadOrStoreSubmissionFiles

 /**
  * Upload or store some files for a submission, depending if the user is offline or not.
  *
  * @param  {number}  workshopId   Workshop ID.
  * @param  {number}  submissionId If not editing, it will refer to timecreated.
  * @param  {any[]}   files        List of files.
  * @param  {boolean} editing      If the submission is being edited or added otherwise.
  * @param  {boolean} offline      True if files sould be stored for offline, false to upload them.
  * @param  {string}  [siteId]     Site ID. If not defined, current site.
  * @return {Promise<any>}         Promise resolved if success.
  */
 uploadOrStoreSubmissionFiles(workshopId: number, submissionId: number, files: any[], editing: boolean, offline: boolean,
         siteId?: string): Promise<any> {
     if (offline) {
         return this.storeSubmissionFiles(workshopId, submissionId, editing, files, siteId);
     } else {
         return this.uploaderProvider.uploadOrReuploadFiles(files, AddonModWorkshopProvider.COMPONENT, workshopId, siteId);
     }
 }
开发者ID:SATS-Seminary,项目名称:moodlemobile2,代码行数:19,代码来源:helper.ts


示例2: uploadOrStoreNewDiscussionFiles

 /**
  * Upload or store some files for a new discussion, depending if the user is offline or not.
  *
  * @param  {number}  forumId     Forum ID.
  * @param  {number}  timecreated The time the discussion was created.
  * @param  {any[]}   files       List of files.
  * @param  {boolean} offline     True if files sould be stored for offline, false to upload them.
  * @param  {string}  [siteId]    Site ID. If not defined, current site.
  * @return {Promise<any>}        Promise resolved if success.
  */
 uploadOrStoreNewDiscussionFiles(forumId: number, timecreated: number, files: any[], offline: boolean, siteId?: string)
         : Promise<any> {
     if (offline) {
         return this.storeNewDiscussionFiles(forumId, timecreated, files, siteId);
     } else {
         return this.uploaderProvider.uploadOrReuploadFiles(files, AddonModForumProvider.COMPONENT, forumId, siteId);
     }
 }
开发者ID:SATS-Seminary,项目名称:moodlemobile2,代码行数:18,代码来源:helper.ts


示例3: uploadOrStoreAssessmentFiles

 /**
  * Upload or store some files for an assessment, depending if the user is offline or not.
  *
  * @param  {number}  workshopId   Workshop ID.
  * @param  {number}  assessmentId ID.
  * @param  {any[]}   files        List of files.
  * @param  {boolean} offline      True if files sould be stored for offline, false to upload them.
  * @param  {string}  [siteId]     Site ID. If not defined, current site.
  * @return {Promise<any>}         Promise resolved if success.
  */
 uploadOrStoreAssessmentFiles(workshopId: number, assessmentId: number, files: any[], offline: boolean, siteId?: string):
         Promise<any> {
     if (offline) {
         return this.storeAssessmentFiles(workshopId, assessmentId, files, siteId);
     } else {
         return this.uploaderProvider.uploadOrReuploadFiles(files, AddonModWorkshopProvider.COMPONENT, workshopId, siteId);
     }
 }
开发者ID:SATS-Seminary,项目名称:moodlemobile2,代码行数:18,代码来源:helper.ts


示例4: uploadOrStoreReplyFiles

 /**
  * Upload or store some files for a reply, depending if the user is offline or not.
  *
  * @param  {number}  forumId  Forum ID.
  * @param  {number}  postId   ID of the post being replied.
  * @param  {any[]}   files    List of files.
  * @param  {boolean} offline  True if files sould be stored for offline, false to upload them.
  * @param  {string}  [siteId] Site ID. If not defined, current site.
  * @param  {number}  [userId] User the reply belongs to. If not defined, current user in site.
  * @return {Promise<any>}     Promise resolved if success.
  */
 uploadOrStoreReplyFiles(forumId: number, postId: number, files: any[], offline: boolean, siteId?: string, userId?: number)
         : Promise<any> {
     if (offline) {
         return this.storeReplyFiles(forumId, postId, files, siteId, userId);
     } else {
         return this.uploaderProvider.uploadOrReuploadFiles(files, AddonModForumProvider.COMPONENT, forumId, siteId);
     }
 }
开发者ID:SATS-Seminary,项目名称:moodlemobile2,代码行数:19,代码来源:helper.ts


示例5: uploadOrStoreFiles

 /**
  * Upload or store some files, depending if the user is offline or not.
  *
  * @param  {number}  glossaryId    Glossary ID.
  * @param  {string}  entryName     The name of the entry.
  * @param  {number}  [timeCreated] The time the entry was created.
  * @param  {any[]}   files         List of files.
  * @param  {boolean} offline       True if files sould be stored for offline, false to upload them.
  * @param  {string}  [siteId]      Site ID. If not defined, current site.
  * @return {Promise<any>}          Promise resolved if success.
  */
 uploadOrStoreFiles(glossaryId: number, entryName: string, timeCreated: number, files: any[], offline: boolean,
         siteId?: string): Promise<any> {
     if (offline) {
         return this.storeFiles(glossaryId, entryName, timeCreated, files, siteId);
     } else {
         return this.uploaderProvider.uploadOrReuploadFiles(files, AddonModGlossaryProvider.COMPONENT, glossaryId, siteId);
     }
 }
开发者ID:SATS-Seminary,项目名称:moodlemobile2,代码行数:19,代码来源:helper.ts


示例6: uploadOrStoreFiles

    /**
     * Upload or store some files, depending if the user is offline or not.
     *
     * @param  {number}   dataId     Database ID.
     * @param  {number}   [itemId=0] Draft ID to use. Undefined or 0 to create a new draft ID.
     * @param  {number}   entryId    Entry ID or, if creating, timemodified.
     * @param  {number}   fieldId    Field ID.
     * @param  {any[]}    files      List of files.
     * @param  {boolean}  offline    True if files sould be stored for offline, false to upload them.
     * @param  {string}   [siteId]   Site ID. If not defined, current site.
     * @return {Promise<any>}        Promise resolved if success.
     */
    uploadOrStoreFiles(dataId: number, itemId: number = 0, entryId: number, fieldId: number, files: any[], offline: boolean,
            siteId?: string): Promise<any> {
        if (files.length) {
            if (offline) {
                return this.storeFiles(dataId, entryId, fieldId, files, siteId);
            }

            return this.fileUploaderProvider.uploadOrReuploadFiles(files, AddonModDataProvider.COMPONENT, itemId, siteId);
        }

        return Promise.resolve(0);
    }
开发者ID:jleyva,项目名称:moodlemobile2,代码行数:24,代码来源:helper.ts


示例7: hasPostDataChanged

    /**
     * Check if the data of a post/discussion has changed.
     *
     * @param  {any} post       Current data.
     * @param  {any} [original] Original ata.
     * @return {boolean} True if data has changed, false otherwise.
     */
    hasPostDataChanged(post: any, original?: any): boolean {
        if (!original || original.subject == null) {
            // There is no original data, assume it hasn't changed.
            return false;
        }

        if (post.subject != original.subject || post.message != original.message) {
            return true;
        }

        return this.uploaderProvider.areFileListDifferent(post.files, original.files);
    }
开发者ID:SATS-Seminary,项目名称:moodlemobile2,代码行数:19,代码来源:helper.ts


示例8: hasEntryDataChanged

    /**
     * Check if the data of an entry has changed.
     *
     * @param  {any}   entry    Current data.
     * @param  {any[]} files    Files attached.
     * @param  {any}   original Original content.
     * @return {boolean}        True if data has changed, false otherwise.
     */
    hasEntryDataChanged(entry: any, files: any[], original: any): boolean {
        if (!original || typeof original.concept == 'undefined') {
            // There is no original data.
            return entry.definition || entry.concept || files.length > 0;
        }

        if (original.definition != entry.definition || original.concept != entry.concept) {
            return true;
        }

        return this.uploaderProvider.areFileListDifferent(files, original.files);
    }
开发者ID:SATS-Seminary,项目名称:moodlemobile2,代码行数:20,代码来源:helper.ts


示例9: ngOnInit

    /**
     * Component being initialized.
     */
    ngOnInit(): void {
        this.maxSize = Number(this.maxSize); // Make sure it's defined and it's a number.
        this.maxSize = !isNaN(this.maxSize) && this.maxSize > 0 ? this.maxSize : -1;

        if (this.maxSize == -1) {
            this.maxSizeReadable = this.translate.instant('core.unknown');
        } else {
            this.maxSizeReadable = this.textUtils.bytesToSize(this.maxSize, 2);
        }

        if (typeof this.maxSubmissions == 'undefined' || this.maxSubmissions < 0) {
            this.maxSubmissionsReadable = this.translate.instant('core.unknown');
            this.unlimitedFiles = true;
        } else {
            this.maxSubmissionsReadable = String(this.maxSubmissions);
        }

        if (this.acceptedTypes && this.acceptedTypes.trim()) {
            this.fileTypes = this.fileUploaderProvider.prepareFiletypeList(this.acceptedTypes);
        }
    }
开发者ID:SATS-Seminary,项目名称:moodlemobile2,代码行数:24,代码来源:attachments.ts


示例10:

 return this.forumOffline.getNewDiscussionFolder(forumId, timecreated, siteId).then((folderPath) => {
     return this.uploaderProvider.getStoredFiles(folderPath);
 });
开发者ID:SATS-Seminary,项目名称:moodlemobile2,代码行数:3,代码来源:helper.ts



注:本文中的@core/fileuploader/providers/fileuploader.CoreFileUploaderProvider类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript helper.CoreFileUploaderHelperProvider类代码示例发布时间:2022-05-28
下一篇:
TypeScript exports.Module类代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap